Changes in uspace/app/terminal/main.c [ce862ac:06d0c81] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/terminal/main.c
rce862ac r06d0c81 1 1 /* 2 * Copyright (c) 202 1Jiri Svoboda2 * Copyright (c) 2020 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 33 33 */ 34 34 35 #include <stdio.h> 36 #include <task.h> 35 37 #include <ui/ui.h> 36 #include <stdio.h>37 38 #include "terminal.h" 38 39 … … 44 45 printf("Syntax: %s [<options>]\n", NAME); 45 46 printf("\t-d <display-spec> Use the specified display\n"); 46 printf("\t-c <command> Run command instead of shell\n");47 47 printf("\t-topleft] Place window to the top-left corner of " 48 48 "the screen\n"); … … 52 52 { 53 53 const char *display_spec = UI_DISPLAY_DEFAULT; 54 const char *command = "/app/bdsh";55 54 terminal_t *terminal = NULL; 56 55 terminal_flags_t flags = 0; … … 69 68 70 69 display_spec = argv[i++]; 71 } else if (str_cmp(argv[i], "-c") == 0) {72 ++i;73 if (i >= argc) {74 printf("Argument missing.\n");75 print_syntax();76 return 1;77 }78 79 command = argv[i++];80 70 } else if (str_cmp(argv[i], "-topleft") == 0) { 81 71 ++i; … … 93 83 } 94 84 95 rc = terminal_create(display_spec, 640, 480, flags, command,&terminal);85 rc = terminal_create(display_spec, 640, 480, flags, &terminal); 96 86 if (rc != EOK) 97 87 return 1; 98 88 99 ui_run(terminal->ui); 100 101 terminal_destroy(terminal); 89 task_retval(0); 90 async_manager(); 102 91 return 0; 103 92 }
Note:
See TracChangeset
for help on using the changeset viewer.