ddb: use _FLAGS command macros where appropriate
Some command definitions were forced to use DB_FUNC in order to specify their required flags, CS_OWN or CS_MORE. Use the new macros to simplify these. Reviewed by: markj, jhb MFC after: 3 days Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35582
This commit is contained in:
parent
7ce58d4e8c
commit
258958b3c7
@ -1248,7 +1248,7 @@ DEFINE_CLASS_0(gic, arm_gic_driver, arm_gic_methods,
|
|||||||
sizeof(struct arm_gic_softc));
|
sizeof(struct arm_gic_softc));
|
||||||
|
|
||||||
#ifdef DDB
|
#ifdef DDB
|
||||||
DB_FUNC(gic, db_show_gic, db_show_table, CS_OWN, NULL)
|
DB_SHOW_COMMAND_FLAGS(gic, db_show_gic, CS_OWN)
|
||||||
{
|
{
|
||||||
device_t dev;
|
device_t dev;
|
||||||
int t;
|
int t;
|
||||||
|
@ -1473,7 +1473,7 @@ DB_COMMAND(ahd_in, ahd_ddb_in)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DB_FUNC(ahd_out, ahd_ddb_out, db_cmd_table, CS_MORE, NULL)
|
DB_COMMAND_FLAGS(ahd_out, ahd_ddb_out, CS_MORE)
|
||||||
{
|
{
|
||||||
db_expr_t old_value;
|
db_expr_t old_value;
|
||||||
db_expr_t new_value;
|
db_expr_t new_value;
|
||||||
|
@ -292,13 +292,7 @@ static void bxe_ddb_usage()
|
|||||||
db_printf("Usage: bxe[/hpv] <instance> [<address>]\n");
|
db_printf("Usage: bxe[/hpv] <instance> [<address>]\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static db_cmdfcn_t bxe_ddb;
|
DB_COMMAND_FLAGS(bxe, bxe_ddb, CS_OWN)
|
||||||
_DB_SET(_cmd, bxe, bxe_ddb, db_cmd_table, CS_OWN, NULL);
|
|
||||||
|
|
||||||
static void bxe_ddb(db_expr_t blah1,
|
|
||||||
boolean_t blah2,
|
|
||||||
db_expr_t blah3,
|
|
||||||
char *blah4)
|
|
||||||
{
|
{
|
||||||
char if_xname[IFNAMSIZ];
|
char if_xname[IFNAMSIZ];
|
||||||
if_t ifp = NULL;
|
if_t ifp = NULL;
|
||||||
|
@ -333,7 +333,7 @@ netgdb_fini(void)
|
|||||||
* Currently, this command does not support configuring encryption or
|
* Currently, this command does not support configuring encryption or
|
||||||
* compression.
|
* compression.
|
||||||
*/
|
*/
|
||||||
DB_FUNC(netgdb, db_netgdb_cmd, db_cmd_table, CS_OWN, NULL)
|
DB_COMMAND_FLAGS(netgdb, db_netgdb_cmd, CS_OWN)
|
||||||
{
|
{
|
||||||
struct debugnet_ddb_config params;
|
struct debugnet_ddb_config params;
|
||||||
struct debugnet_conn_params dcp;
|
struct debugnet_conn_params dcp;
|
||||||
|
@ -2970,7 +2970,7 @@ db_sysctl_cmd_usage(void)
|
|||||||
/*
|
/*
|
||||||
* Show a specific sysctl similar to sysctl (8).
|
* Show a specific sysctl similar to sysctl (8).
|
||||||
*/
|
*/
|
||||||
DB_FUNC(sysctl, db_sysctl_cmd, db_cmd_table, CS_OWN, NULL)
|
DB_COMMAND_FLAGS(sysctl, db_sysctl_cmd, CS_OWN)
|
||||||
{
|
{
|
||||||
char name[TOK_STRING_SIZE];
|
char name[TOK_STRING_SIZE];
|
||||||
int error, i, t, flags;
|
int error, i, t, flags;
|
||||||
|
@ -203,7 +203,7 @@ DB_SHOW_COMMAND(routetable, db_show_routetable_cmd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_DB_FUNC(_show, route, db_show_route_cmd, db_show_table, CS_OWN, NULL)
|
DB_SHOW_COMMAND_FLAGS(route, db_show_route_cmd, CS_OWN)
|
||||||
{
|
{
|
||||||
char abuf[INET6_ADDRSTRLEN], *buf, *end;
|
char abuf[INET6_ADDRSTRLEN], *buf, *end;
|
||||||
struct rib_head *rh;
|
struct rib_head *rh;
|
||||||
|
@ -689,7 +689,7 @@ DECLARE_MODULE(netdump, netdump_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
|
|||||||
* Currently, this command does not support configuring encryption or
|
* Currently, this command does not support configuring encryption or
|
||||||
* compression.
|
* compression.
|
||||||
*/
|
*/
|
||||||
DB_FUNC(netdump, db_netdump_cmd, db_cmd_table, CS_OWN, NULL)
|
DB_COMMAND_FLAGS(netdump, db_netdump_cmd, CS_OWN)
|
||||||
{
|
{
|
||||||
static struct diocskerneldump_arg conf;
|
static struct diocskerneldump_arg conf;
|
||||||
static char blockbuf[NETDUMP_DATASIZE];
|
static char blockbuf[NETDUMP_DATASIZE];
|
||||||
|
@ -1172,7 +1172,7 @@ dmar_print_domain(struct dmar_domain *domain, bool show_mappings)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DB_FUNC(dmar_domain, db_dmar_print_domain, db_show_table, CS_OWN, NULL)
|
DB_SHOW_COMMAND_FLAGS(dmar_domain, db_dmar_print_domain, CS_OWN)
|
||||||
{
|
{
|
||||||
struct dmar_unit *unit;
|
struct dmar_unit *unit;
|
||||||
struct dmar_domain *domain;
|
struct dmar_domain *domain;
|
||||||
|
Loading…
Reference in New Issue
Block a user