Changeset f03d1308 in mainline for uspace/app/terminal/main.c
- Timestamp:
- 2020-10-28T12:42:11Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8009dc27
- Parents:
- d284ce9
- git-author:
- Jiri Svoboda <jiri@…> (2020-10-28 12:41:11)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-10-28 12:42:11)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/terminal/main.c
rd284ce9 rf03d1308 1 1 /* 2 * Copyright (c) 20 19Jiri Svoboda2 * Copyright (c) 2020 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 33 33 */ 34 34 35 #include <display.h>36 35 #include <stdio.h> 37 36 #include <task.h> 37 #include <ui/ui.h> 38 38 #include "terminal.h" 39 39 … … 43 43 static void print_syntax(void) 44 44 { 45 printf("Syntax: %s [-d <display >]\n", NAME);45 printf("Syntax: %s [-d <display-spec>]\n", NAME); 46 46 } 47 47 48 48 int main(int argc, char *argv[]) 49 49 { 50 const char *display_svc = DISPLAY_DEFAULT; 51 display_t *display = NULL; 50 const char *display_spec = UI_DISPLAY_DEFAULT; 52 51 terminal_t *terminal = NULL; 53 52 errno_t rc; … … 64 63 } 65 64 66 display_s vc = argv[i++];65 display_spec = argv[i++]; 67 66 } else { 68 67 printf("Invalid option '%s'.\n", argv[i]); … … 77 76 } 78 77 79 rc = display_open(display_svc, &display); 80 if (rc != EOK) { 81 printf("%s: Error opening display.\n", NAME); 78 rc = terminal_create(display_spec, 640, 480, &terminal); 79 if (rc != EOK) 82 80 return 1; 83 }84 85 rc = terminal_create(display, 640, 480, &terminal);86 if (rc != EOK) {87 display_close(display);88 return 1;89 }90 81 91 82 task_retval(0);
Note:
See TracChangeset
for help on using the changeset viewer.