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


Ignore:
File:
1 edited

Legend:

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

    r4deb8b5 rfc11b8a  
    3131#include <stdio.h>
    3232#include <stdlib.h>
    33 #include <str.h>
     33#include <string.h>
    3434#include <unistd.h>
    3535#include "config.h"
     
    6161        usr->line = (char *) NULL;
    6262        usr->name = "root";
     63        usr->home = "/";
    6364        usr->cwd = (char *) NULL;
    6465        usr->prompt = (char *) NULL;
     66        chdir(usr->home);
    6567        usr->lasterr = 0;
    66 
    67         if (input_init() != 0)
    68                 return 1;
    69 
    7068        return (int) cli_set_prompt(usr);
    7169}
     
    8987                exit(EXIT_FAILURE);
    9088
     89        printf("Welcome to %s - %s\nType `help' at any time for usage information.\n",
     90                progname, PACKAGE_STRING);
     91
    9192        while (!cli_quit) {
    9293                get_input(&usr);
     
    9798                }
    9899        }
     100        goto finit;
    99101
    100         printf("Leaving %s.\n", progname);
    101 
     102finit:
    102103        cli_finit(&usr);
    103104        return ret;
Note: See TracChangeset for help on using the changeset viewer.