Changeset 7b11315 in mainline for uspace/app/terminal/main.c
- Timestamp:
- 2021-11-01T21:24:05Z (2 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 24c452b3
- Parents:
- 91ece11b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/terminal/main.c
r91ece11b r7b11315 1 1 /* 2 * Copyright (c) 202 0Jiri Svoboda2 * Copyright (c) 2021 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 45 45 printf("Syntax: %s [<options>]\n", NAME); 46 46 printf("\t-d <display-spec> Use the specified display\n"); 47 printf("\t-c <command> Run command instead of shell\n"); 47 48 printf("\t-topleft] Place window to the top-left corner of " 48 49 "the screen\n"); … … 52 53 { 53 54 const char *display_spec = UI_DISPLAY_DEFAULT; 55 const char *command = "/app/bdsh"; 54 56 terminal_t *terminal = NULL; 55 57 terminal_flags_t flags = 0; … … 68 70 69 71 display_spec = argv[i++]; 72 } else if (str_cmp(argv[i], "-c") == 0) { 73 ++i; 74 if (i >= argc) { 75 printf("Argument missing.\n"); 76 print_syntax(); 77 return 1; 78 } 79 80 command = argv[i++]; 70 81 } else if (str_cmp(argv[i], "-topleft") == 0) { 71 82 ++i; … … 83 94 } 84 95 85 rc = terminal_create(display_spec, 640, 480, flags, &terminal);96 rc = terminal_create(display_spec, 640, 480, flags, command, &terminal); 86 97 if (rc != EOK) 87 98 return 1;
Note:
See TracChangeset
for help on using the changeset viewer.