Page MenuHomeFreeBSD

D35367.diff
No OneTemporary

D35367.diff

diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -83,28 +83,28 @@
* 'show' commands
*/
-static struct command db_show_active_cmds[] = {
+static struct db_command db_show_active_cmds[] = {
{ "trace", db_stack_trace_active, 0, NULL },
};
-struct command_table db_show_active_table =
+struct db_command_table db_show_active_table =
LIST_HEAD_INITIALIZER(db_show_active_table);
-static struct command db_show_all_cmds[] = {
+static struct db_command db_show_all_cmds[] = {
{ "trace", db_stack_trace_all, 0, NULL },
};
-struct command_table db_show_all_table =
+struct db_command_table db_show_all_table =
LIST_HEAD_INITIALIZER(db_show_all_table);
-static struct command db_show_cmds[] = {
+static struct db_command db_show_cmds[] = {
{ "active", 0, 0, &db_show_active_table },
{ "all", 0, 0, &db_show_all_table },
{ "registers", db_show_regs, 0, NULL },
{ "breaks", db_listbreak_cmd, 0, NULL },
{ "threads", db_show_threads, 0, NULL },
};
-struct command_table db_show_table = LIST_HEAD_INITIALIZER(db_show_table);
+struct db_command_table db_show_table = LIST_HEAD_INITIALIZER(db_show_table);
-static struct command db_cmds[] = {
+static struct db_command db_cmds[] = {
{ "print", db_print_cmd, 0, NULL },
{ "p", db_print_cmd, 0, NULL },
{ "examine", db_examine_cmd, CS_SET_DOT, NULL },
@@ -155,9 +155,9 @@
{ "textdump", db_textdump_cmd, CS_OWN, NULL },
{ "findstack", db_findstack_cmd, 0, NULL },
};
-struct command_table db_cmd_table = LIST_HEAD_INITIALIZER(db_cmd_table);
+struct db_command_table db_cmd_table = LIST_HEAD_INITIALIZER(db_cmd_table);
-static struct command *db_last_command = NULL;
+static struct db_command *db_last_command = NULL;
/*
* if 'ed' style: 'dot' is set at start of last item printed,
@@ -187,13 +187,13 @@
#define CMD_AMBIGUOUS 3
#define CMD_HELP 4
-static void db_cmd_match(char *name, struct command *cmd,
- struct command **cmdp, int *resultp);
-static void db_cmd_list(struct command_table *table);
-static int db_cmd_search(char *name, struct command_table *table,
- struct command **cmdp);
-static void db_command(struct command **last_cmdp,
- struct command_table *cmd_table, int dopager);
+static void db_cmd_match(char *name, struct db_command *cmd,
+ struct db_command **cmdp, int *resultp);
+static void db_cmd_list(struct db_command_table *table);
+static int db_cmd_search(char *name, struct db_command_table *table,
+ struct db_command **cmdp);
+static void db_command(struct db_command **last_cmdp,
+ struct db_command_table *cmd_table, int dopager);
/*
* Initialize the command lists from the static tables.
@@ -220,9 +220,9 @@
* Register a command.
*/
void
-db_command_register(struct command_table *list, struct command *cmd)
+db_command_register(struct db_command_table *list, struct db_command *cmd)
{
- struct command *c, *last;
+ struct db_command *c, *last;
last = NULL;
LIST_FOREACH(c, list, next) {
@@ -251,9 +251,9 @@
* Remove a command previously registered with db_command_register.
*/
void
-db_command_unregister(struct command_table *list, struct command *cmd)
+db_command_unregister(struct db_command_table *list, struct db_command *cmd)
{
- struct command *c;
+ struct db_command *c;
LIST_FOREACH(c, list, next) {
if (cmd == c) {
@@ -268,7 +268,7 @@
* Helper function to match a single command.
*/
static void
-db_cmd_match(char *name, struct command *cmd, struct command **cmdp,
+db_cmd_match(char *name, struct db_command *cmd, struct db_command **cmdp,
int *resultp)
{
char *lp, *rp;
@@ -304,10 +304,11 @@
* Search for command prefix.
*/
static int
-db_cmd_search(char *name, struct command_table *table, struct command **cmdp)
+db_cmd_search(char *name, struct db_command_table *table,
+ struct db_command **cmdp)
{
- struct command *cmd;
- int result = CMD_NONE;
+ struct db_command *cmd;
+ int result = CMD_NONE;
LIST_FOREACH(cmd, table, next) {
db_cmd_match(name,cmd,cmdp,&result);
@@ -325,9 +326,9 @@
}
static void
-db_cmd_list(struct command_table *table)
+db_cmd_list(struct db_command_table *table)
{
- struct command *cmd;
+ struct db_command *cmd;
int have_subcommands;
have_subcommands = 0;
@@ -351,10 +352,10 @@
}
static void
-db_command(struct command **last_cmdp, struct command_table *cmd_table,
+db_command(struct db_command **last_cmdp, struct db_command_table *cmd_table,
int dopager)
{
- struct command *cmd = NULL;
+ struct db_command *cmd = NULL;
int t;
char modif[TOK_STRING_SIZE];
db_expr_t addr, count;
diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h
--- a/sys/ddb/ddb.h
+++ b/sys/ddb/ddb.h
@@ -94,11 +94,11 @@
* - The last one for sub-commands of 'show all'; type 'show all'
* without any argument to get a list.
*/
-struct command;
-LIST_HEAD(command_table, command);
-extern struct command_table db_cmd_table;
-extern struct command_table db_show_table;
-extern struct command_table db_show_all_table;
+struct db_command;
+LIST_HEAD(db_command_table, db_command);
+extern struct db_command_table db_cmd_table;
+extern struct db_command_table db_show_table;
+extern struct db_command_table db_show_all_table;
/*
* Type signature for a function implementing a ddb command.
@@ -109,7 +109,7 @@
/*
* Command table entry.
*/
-struct command {
+struct db_command {
char * name; /* command name */
db_cmdfcn_t *fcn; /* function to call */
int flag; /* extra info: */
@@ -117,8 +117,8 @@
#define CS_MORE 0x2 /* standard syntax, but may have other words
* at end */
#define CS_SET_DOT 0x100 /* set dot after command */
- struct command_table *more; /* another level of command */
- LIST_ENTRY(command) next; /* next entry in the command table */
+ struct db_command_table *more; /* another level of command */
+ LIST_ENTRY(db_command) next; /* next entry in the command table */
};
/*
@@ -128,7 +128,7 @@
* the module is loaded.
*/
#define _DB_SET(_suffix, _name, _func, list, _flag, _more) \
-static struct command __CONCAT(_name,_suffix) = { \
+static struct db_command __CONCAT(_name,_suffix) = { \
.name = __STRING(_name), \
.fcn = _func, \
.flag = _flag, \
@@ -225,8 +225,10 @@
bool db_value_of_name_pcpu(const char *name, db_expr_t *valuep);
bool db_value_of_name_vnet(const char *name, db_expr_t *valuep);
int db_write_bytes(vm_offset_t addr, size_t size, char *data);
-void db_command_register(struct command_table *, struct command *);
-void db_command_unregister(struct command_table *, struct command *);
+void db_command_register(struct db_command_table *,
+ struct db_command *);
+void db_command_unregister(struct db_command_table *,
+ struct db_command *);
int db_fetch_ksymtab(vm_offset_t ksym_start, vm_offset_t ksym_end,
vm_offset_t relbase);
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -12932,7 +12932,7 @@
} while (i != first && !db_pager_quit);
}
-static struct command_table db_t4_table = LIST_HEAD_INITIALIZER(db_t4_table);
+static struct db_command_table db_t4_table = LIST_HEAD_INITIALIZER(db_t4_table);
_DB_SET(_show, t4, NULL, db_show_table, 0, &db_t4_table);
DB_FUNC(devlog, db_show_devlog, db_t4_table, CS_OWN, NULL)

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 15, 12:37 PM (15 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14642023
Default Alt Text
D35367.diff (7 KB)

Event Timeline