summaryrefslogtreecommitdiffstats
path: root/include/command.h
diff options
context:
space:
mode:
authorSascha Hauer <sha@pengutronix.de>2009-10-17 12:23:03 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2009-10-19 10:18:52 +0200
commit0ecf7f1aeb906e3b30500080fbc4e1d1b770f1a2 (patch)
treeab30c93958c0cc3b2191d564d36fc30ecdb221ee /include/command.h
parentcf996861d76fd7156c5bc096c68c62110f4531d7 (diff)
downloadbarebox-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/command.h')
-rw-r--r--include/command.h4
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__ */
/*