Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/terminal/main.c

    rce862ac r06d0c81  
    11/*
    2  * Copyright (c) 2021 Jiri Svoboda
     2 * Copyright (c) 2020 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3333 */
    3434
     35#include <stdio.h>
     36#include <task.h>
    3537#include <ui/ui.h>
    36 #include <stdio.h>
    3738#include "terminal.h"
    3839
     
    4445        printf("Syntax: %s [<options>]\n", NAME);
    4546        printf("\t-d <display-spec> Use the specified display\n");
    46         printf("\t-c <command>      Run command instead of shell\n");
    4747        printf("\t-topleft]         Place window to the top-left corner of "
    4848            "the screen\n");
     
    5252{
    5353        const char *display_spec = UI_DISPLAY_DEFAULT;
    54         const char *command = "/app/bdsh";
    5554        terminal_t *terminal = NULL;
    5655        terminal_flags_t flags = 0;
     
    6968
    7069                        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++];
    8070                } else if (str_cmp(argv[i], "-topleft") == 0) {
    8171                        ++i;
     
    9383        }
    9484
    95         rc = terminal_create(display_spec, 640, 480, flags, command, &terminal);
     85        rc = terminal_create(display_spec, 640, 480, flags, &terminal);
    9686        if (rc != EOK)
    9787                return 1;
    9888
    99         ui_run(terminal->ui);
    100 
    101         terminal_destroy(terminal);
     89        task_retval(0);
     90        async_manager();
    10291        return 0;
    10392}
Note: See TracChangeset for help on using the changeset viewer.