mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-21 22:00:49 +00:00
btrfs-progs: help: define helper for command with flags
Add macro to define a simple command that also gets some non-default flags, eg. the output formats. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
17aee13fcd
commit
54fbdafdc5
@ -88,6 +88,14 @@ struct cmd_struct {
|
||||
DEFINE_COMMAND(name, token, cmd_ ##name, \
|
||||
cmd_ ##name ##_usage, NULL, 0)
|
||||
|
||||
/*
|
||||
* Define a command with flags, eg. with the additional output formats.
|
||||
* See CMD_* .
|
||||
*/
|
||||
#define DEFINE_COMMAND_WITH_FLAGS(name, token, flags) \
|
||||
DEFINE_COMMAND(name, token, cmd_ ##name, \
|
||||
cmd_ ##name ##_usage, NULL, (flags))
|
||||
|
||||
/*
|
||||
* Define a command group callback.
|
||||
* It's assumed that the callback is called cmd_<name> and the
|
||||
|
Loading…
Reference in New Issue
Block a user