Changeset 6ea9a1d in mainline for uspace/app/bdsh/scli.c


Ignore:
Timestamp:
2011-06-11T22:32:24Z (14 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
36ab7c7
Parents:
ae45201
Message:

Allow shell builtins to be redirected too

File:
1 edited

Legend:

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

    rae45201 r6ea9a1d  
    4242/* See scli.h */
    4343static cliuser_t usr;
     44static iostate_t *iostate;
     45static iostate_t stdiostate;
    4446
    4547/* Globals that are modified during start-up that modules/builtins
     
    8284}
    8385
     86iostate_t *get_iostate(void)
     87{
     88        return iostate;
     89}
     90
     91
     92void set_iostate(iostate_t *ios)
     93{
     94        iostate = ios;
     95        stdin = ios->stdin;
     96        stdout = ios->stdout;
     97        stderr = ios->stderr;
     98}
     99
    84100int main(int argc, char *argv[])
    85101{
    86102        int ret = 0;
     103       
     104        stdiostate.stdin = stdin;
     105        stdiostate.stdout = stdout;
     106        stdiostate.stderr = stderr;
     107        iostate = &stdiostate;
    87108
    88109        if (cli_init(&usr))
Note: See TracChangeset for help on using the changeset viewer.