aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2008-09-25 19:50:14 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2008-09-25 19:50:14 +0000
commit93d4804b62f8372f10524ec3dd8ac1e44f71e4aa (patch)
treee8c244b2d81b93da1c8896870f96435db68adb09 /sys
parent59c47d99be1bd30bdb8341ae71b57bce133ad346 (diff)
downloadsrc-93d4804b62f8372f10524ec3dd8ac1e44f71e4aa.tar.gz
src-93d4804b62f8372f10524ec3dd8ac1e44f71e4aa.zip
Initialize the DDB command list when initializing DDB so that the basic
commands are available from 'boot -d'. Suggested by: dfr
Notes
Notes: svn path=/head/; revision=183360
Diffstat (limited to 'sys')
-rw-r--r--sys/ddb/db_command.c5
-rw-r--r--sys/ddb/db_command.h1
-rw-r--r--sys/ddb/db_main.c1
3 files changed, 4 insertions, 3 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index bac7803ecdce..1e3401601d8d 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -181,8 +181,8 @@ static void db_command(struct command **last_cmdp,
/*
* Initialize the command lists from the static tables.
*/
-static void
-db_cmd_init(void)
+void
+db_command_init(void)
{
#define N(a) (sizeof(a) / sizeof(a[0]))
int i;
@@ -195,7 +195,6 @@ db_cmd_init(void)
db_command_register(&db_show_all_table, &db_show_all_cmds[i]);
#undef N
}
-SYSINIT(_cmd_init, SI_SUB_KLD, SI_ORDER_FIRST, db_cmd_init, NULL);
/*
* Register a command.
diff --git a/sys/ddb/db_command.h b/sys/ddb/db_command.h
index db9f495a8082..7d9370c254cf 100644
--- a/sys/ddb/db_command.h
+++ b/sys/ddb/db_command.h
@@ -37,6 +37,7 @@
* Command loop declarations.
*/
+void db_command_init(void);
void db_command_loop(void);
void db_command_script(const char *command);
diff --git a/sys/ddb/db_main.c b/sys/ddb/db_main.c
index e63b4fc0991a..837510817938 100644
--- a/sys/ddb/db_main.c
+++ b/sys/ddb/db_main.c
@@ -172,6 +172,7 @@ db_init(void)
uintptr_t symtab, strtab;
Elf_Size tabsz, strsz;
+ db_command_init();
if (ksym_end > ksym_start && ksym_start != 0) {
symtab = ksym_start;
tabsz = *((Elf_Size*)symtab);