ddb: add _FLAGS command variants
Provide _FLAGS variants of the various command definition macros, in anticipation of adding a new flag. This can also be used for some existing commands which require special flag values. Reviewed by: markj MFC after: 3 days Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35581
This commit is contained in:
parent
8a09948233
commit
7ce58d4e8c
@ -164,14 +164,22 @@ _func(db_expr_t addr, bool have_addr, db_expr_t count, char *modif)
|
||||
#define DB_FUNC(_name, _func, list, _flag, _more) \
|
||||
_DB_FUNC(_cmd, _name, _func, list, _flag, _more)
|
||||
|
||||
#define DB_COMMAND_FLAGS(cmd_name, func_name, flags) \
|
||||
_DB_FUNC(_cmd, cmd_name, func_name, db_cmd_table, flags, NULL)
|
||||
#define DB_COMMAND(cmd_name, func_name) \
|
||||
_DB_FUNC(_cmd, cmd_name, func_name, db_cmd_table, 0, NULL)
|
||||
DB_COMMAND_FLAGS(cmd_name, func_name, 0)
|
||||
#define DB_ALIAS_FLAGS(alias_name, func_name, flags) \
|
||||
_DB_SET(_cmd, alias_name, func_name, db_cmd_table, flags, NULL)
|
||||
#define DB_ALIAS(alias_name, func_name) \
|
||||
_DB_SET(_cmd, alias_name, func_name, db_cmd_table, 0, NULL)
|
||||
DB_ALIAS_FLAGS(alias_name, func_name, 0)
|
||||
#define DB_SHOW_COMMAND_FLAGS(cmd_name, func_name, flags) \
|
||||
_DB_FUNC(_show, cmd_name, func_name, db_show_table, flags, NULL)
|
||||
#define DB_SHOW_COMMAND(cmd_name, func_name) \
|
||||
_DB_FUNC(_show, cmd_name, func_name, db_show_table, 0, NULL)
|
||||
DB_SHOW_COMMAND_FLAGS(cmd_name, func_name, 0)
|
||||
#define DB_SHOW_ALIAS_FLAGS(alias_name, func_name, flags) \
|
||||
_DB_SET(_show, alias_name, func_name, db_show_table, flags, NULL)
|
||||
#define DB_SHOW_ALIAS(alias_name, func_name) \
|
||||
_DB_SET(_show, alias_name, func_name, db_show_table, 0, NULL)
|
||||
DB_SHOW_ALIAS_FLAGS(alias_name, func_name, 0)
|
||||
#define DB_SHOW_ALL_COMMAND(cmd_name, func_name) \
|
||||
_DB_FUNC(_show_all, cmd_name, func_name, db_show_all_table, 0, NULL)
|
||||
#define DB_SHOW_ALL_ALIAS(alias_name, func_name) \
|
||||
|
Loading…
Reference in New Issue
Block a user