Changes in uspace/app/bdsh/scli.c [fc11b8a:4deb8b5] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/scli.c

    rfc11b8a r4deb8b5  
    3131#include <stdio.h>
    3232#include <stdlib.h>
    33 #include <string.h>
     33#include <str.h>
    3434#include <unistd.h>
    3535#include "config.h"
     
    6161        usr->line = (char *) NULL;
    6262        usr->name = "root";
    63         usr->home = "/";
    6463        usr->cwd = (char *) NULL;
    6564        usr->prompt = (char *) NULL;
    66         chdir(usr->home);
    6765        usr->lasterr = 0;
     66
     67        if (input_init() != 0)
     68                return 1;
     69
    6870        return (int) cli_set_prompt(usr);
    6971}
     
    8789                exit(EXIT_FAILURE);
    8890
    89         printf("Welcome to %s - %s\nType `help' at any time for usage information.\n",
    90                 progname, PACKAGE_STRING);
    91 
    9291        while (!cli_quit) {
    9392                get_input(&usr);
     
    9897                }
    9998        }
    100         goto finit;
    10199
    102 finit:
     100        printf("Leaving %s.\n", progname);
     101
    103102        cli_finit(&usr);
    104103        return ret;
Note: See TracChangeset for help on using the changeset viewer.