diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2015-03-17 12:53:14 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-03-19 07:46:22 +0100 |
commit | 9f15b421057304c17556a75b439eef42a9d38436 (patch) | |
tree | c96ef3308b71a963cb3366a2e04ae2abb76389dd /include | |
parent | 5f5d5331bb5e029264b9bc0cfbb3c32ec3158638 (diff) | |
download | barebox-9f15b421057304c17556a75b439eef42a9d38436.tar.gz barebox-9f15b421057304c17556a75b439eef42a9d38436.tar.xz |
command: allow runtime usage
This will allow as example to list the currently supported digest.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/command.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/command.h b/include/command.h index 5d5bf53544..3aca1a9f1b 100644 --- a/include/command.h +++ b/include/command.h @@ -54,6 +54,7 @@ struct command { uint32_t group; #ifdef CONFIG_LONGHELP const char *help; /* Help message (long) */ + void (*usage)(void); #endif } #ifdef __x86_64__ @@ -115,8 +116,10 @@ static const __maybe_unused char cmd_##_name##_help[] = #ifdef CONFIG_LONGHELP #define BAREBOX_CMD_HELP(text) .help = text, +#define BAREBOX_CMD_USAGE(fn) .usage = fn, #else #define BAREBOX_CMD_HELP(text) +#define BAREBOX_CMD_USAGE(fn) #endif #define BAREBOX_CMD_GROUP(grp) .group = grp, |