diff options
Diffstat (limited to 'common/command.c')
-rw-r--r-- | common/command.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/command.c b/common/command.c index 597ab4c..26c37f2 100644 --- a/common/command.c +++ b/common/command.c @@ -538,3 +538,13 @@ enum command_ret_t cmd_process(int flag, int argc, char * const argv[], rc = cmd_usage(cmdtp); return rc; } + +int cmd_process_error(cmd_tbl_t *cmdtp, int err) +{ + if (err) { + printf("Command '%s' failed: Error %d\n", cmdtp->name, err); + return 1; + } + + return 0; +} |