Changeset 04803bf in mainline for uspace/app/bdsh/scli.c


Ignore:
Timestamp:
2011-03-21T22:00:17Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
143932e3
Parents:
b50b5af2 (diff), 7308e84 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes (needs fixes).

File:
1 edited

Legend:

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

    rb50b5af2 r04803bf  
    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.