Lines Matching refs:cmd
177 static void db_cmd_match(char *name, struct command *cmd,
207 db_command_register(struct command_table *list, struct command *cmd)
213 int n = strcmp(cmd->name, c->name);
218 " ignoring request\n", __func__, cmd->name);
223 LIST_INSERT_BEFORE(c, cmd, next);
229 LIST_INSERT_HEAD(list, cmd, next);
231 LIST_INSERT_AFTER(last, cmd, next);
238 db_command_unregister(struct command_table *list, struct command *cmd)
243 if (cmd == c) {
244 LIST_REMOVE(cmd, next);
255 db_cmd_match(char *name, struct command *cmd, struct command **cmdp,
262 rp = cmd->name;
266 *cmdp = cmd;
281 *cmdp = cmd;
293 struct command *cmd;
296 LIST_FOREACH(cmd, table, next) {
297 db_cmd_match(name,cmd,cmdp,&result);
314 struct command *cmd;
318 LIST_FOREACH(cmd, table, next) {
319 if (cmd->more != NULL)
321 db_printf("%-16s", cmd->name);
328 LIST_FOREACH(cmd, table, next) {
329 if (cmd->more == NULL)
331 db_printf("%-16s", cmd->name);
341 struct command *cmd = NULL;
351 cmd = *last_cmdp;
374 &cmd);
399 if ((cmd_table = cmd->more) != NULL) {
411 if ((cmd->flag & CS_OWN) == 0) {
452 if ((cmd->flag & CS_MORE) == 0) {
457 *last_cmdp = cmd;
458 if (cmd != NULL) {
466 (*cmd->fcn)(addr, have_addr, count, modif);
470 if (cmd->flag & CS_SET_DOT) {