diff options
author | Omar Sandoval <osandov@fb.com> | 2015-06-24 09:09:16 -0700 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2015-06-26 16:33:38 +0200 |
commit | 12aba72aed310d6d3215684c44849233df7d79d2 (patch) | |
tree | 3bc2bc9a9d2c48d7637b3485c8b1b7399db8ba45 /commands.h | |
parent | d26edf000c83f48a7aaa05ff24e6ebad9a76bd5d (diff) |
btrfs-progs: replace struct cmd_group->hidden with flags
We're also going to want to support aliases, so rather than adding
another member, replace "hidden" with a "flags" member.
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'commands.h')
-rw-r--r-- | commands.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -17,6 +17,10 @@ #ifndef __BTRFS_COMMANDS_H__ #define __BTRFS_COMMANDS_H__ +enum { + CMD_HIDDEN = (1 << 0), /* should not be in help listings */ +}; + struct cmd_struct { const char *token; int (*fn)(int, char **); @@ -47,8 +51,8 @@ struct cmd_struct { /* should be NULL if token is not a subgroup */ const struct cmd_group *next; - /* if true don't list this token in help listings */ - int hidden; + /* CMD_* flags above */ + int flags; }; #define NULL_CMD_STRUCT {NULL, NULL, NULL, NULL, 0} |