Changeset bad8d41 in mainline for uspace/app/bdsh/input.c


Ignore:
Timestamp:
2017-12-21T20:24:54Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Parents:
f04b5b3
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-21 18:24:59)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-21 20:24:54)
Message:

The "not-so-obvious" error handling tweaks.

File:
1 edited

Legend:

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

    rf04b5b3 rbad8d41  
    7373       
    7474        char *cmd[WORD_MAX];
    75         int rc = 0;
     75        int rc = EOK;
    7676        tokenizer_t tok;
    7777        unsigned int i, pipe_count, processed_pipes;
     
    8282        if (usr->line == NULL) {
    8383                free(tokens_buf);
    84                 return CL_EFAIL;
     84                return EINVAL;
    8585        }
    8686
     
    198198        }
    199199
    200         rc = run_command(cmd, usr, &new_iostate);
     200        if (run_command(cmd, usr, &new_iostate) == 0) {
     201                rc = EOK;
     202        } else {
     203                rc = EINVAL;
     204        }
    201205       
    202206finit_with_files:
Note: See TracChangeset for help on using the changeset viewer.