diff options
Diffstat (limited to 'include/command.h')
-rw-r--r-- | include/command.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/command.h b/include/command.h index ffc722ce23..15ce8d4862 100644 --- a/include/command.h +++ b/include/command.h @@ -50,6 +50,7 @@ struct command { const char *usage; /* Usage message (short) */ struct list_head list; /* List of commands */ + uint32_t group; #ifdef CONFIG_LONGHELP const char *help; /* Help message (long) */ #endif @@ -73,6 +74,19 @@ void barebox_cmd_usage(struct command *cmdtp); #define COMMAND_ERROR 1 #define COMMAND_ERROR_USAGE 2 +/* Note: keep this list in sync with commands/command.c */ +#define CMD_GRP_INFO 1 +#define CMD_GRP_BOOT 2 +#define CMD_GRP_ENV 3 +#define CMD_GRP_FILE 4 +#define CMD_GRP_PART 5 +#define CMD_GRP_SCRIPT 6 +#define CMD_GRP_NET 7 +#define CMD_GRP_CONSOLE 8 +#define CMD_GRP_MEM 9 +#define CMD_GRP_HWMANIP 10 +#define CMD_GRP_MISC 11 + #endif /* __ASSEMBLY__ */ #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -108,6 +122,8 @@ static const __maybe_unused char cmd_##_name##_help[] = #define BAREBOX_CMD_HELP(text) #endif +#define BAREBOX_CMD_GROUP(grp) .group = grp, + #endif /* DOXYGEN_SHOULD_SKIP_THIS */ int register_command(struct command *); |