MCPcopy Create free account
hub / github.com/F-Stack/f-stack / db_cmd_list

Function db_cmd_list

freebsd/ddb/db_command.c:327–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327static void
328db_cmd_list(struct command_table *table)
329{
330 struct command *cmd;
331 int have_subcommands;
332
333 have_subcommands = 0;
334 LIST_FOREACH(cmd, table, next) {
335 if (cmd->more != NULL)
336 have_subcommands++;
337 db_printf("%-16s", cmd->name);
338 db_end_line(16);
339 }
340
341 if (have_subcommands > 0) {
342 db_printf("\nThe following have subcommands; append \"help\" "
343 "to list (e.g. \"show help\"):\n");
344 LIST_FOREACH(cmd, table, next) {
345 if (cmd->more == NULL)
346 continue;
347 db_printf("%-16s", cmd->name);
348 db_end_line(16);
349 }
350 }
351}
352
353static void
354db_command(struct command **last_cmdp, struct command_table *cmd_table,

Callers 1

db_commandFunction · 0.85

Calls 2

db_printfFunction · 0.85
db_end_lineFunction · 0.85

Tested by

no test coverage detected