diff options
author | Sascha Hauer <sha@pengutronix.de> | 2009-10-17 12:23:03 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-10-19 10:18:52 +0200 |
commit | 0ecf7f1aeb906e3b30500080fbc4e1d1b770f1a2 (patch) | |
tree | ab30c93958c0cc3b2191d564d36fc30ecdb221ee /include | |
parent | cf996861d76fd7156c5bc096c68c62110f4531d7 (diff) | |
download | barebox-0ecf7f1aeb906e3b30500080fbc4e1d1b770f1a2.tar.gz barebox-0ecf7f1aeb906e3b30500080fbc4e1d1b770f1a2.tar.xz |
commands: add defines for command errors/success
This allows us to return COMMAND_ERROR_USAGE for
a failed command which will then print the usage,
a very common case for commands.
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/command.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/command.h b/include/command.h index aaae6b4309..5d57ecdeb5 100644 --- a/include/command.h +++ b/include/command.h @@ -74,6 +74,10 @@ cmd_tbl_t *find_cmd(const char *cmd); int execute_command(int argc, char **argv); void u_boot_cmd_usage(cmd_tbl_t *cmdtp); +#define COMMAND_SUCCESS 0 +#define COMMAND_ERROR 1 +#define COMMAND_ERROR_USAGE 2 + #endif /* __ASSEMBLY__ */ /* |