Changes in uspace/app/terminal/main.c [06d0c81:ce862ac] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/terminal/main.c
r06d0c81 rce862ac 1 1 /* 2 * Copyright (c) 202 0Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 33 33 */ 34 34 35 #include <ui/ui.h> 35 36 #include <stdio.h> 36 #include <task.h>37 #include <ui/ui.h>38 37 #include "terminal.h" 39 38 … … 45 44 printf("Syntax: %s [<options>]\n", NAME); 46 45 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"; 54 55 terminal_t *terminal = NULL; 55 56 terminal_flags_t flags = 0; … … 68 69 69 70 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++]; 70 80 } else if (str_cmp(argv[i], "-topleft") == 0) { 71 81 ++i; … … 83 93 } 84 94 85 rc = terminal_create(display_spec, 640, 480, flags, &terminal);95 rc = terminal_create(display_spec, 640, 480, flags, command, &terminal); 86 96 if (rc != EOK) 87 97 return 1; 88 98 89 task_retval(0); 90 async_manager(); 99 ui_run(terminal->ui); 100 101 terminal_destroy(terminal); 91 102 return 0; 92 103 }
Note:
See TracChangeset
for help on using the changeset viewer.