From cadfc6aaa0b946d8b9cc9769dc965aa3295bf721 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 1 Oct 2007 22:05:15 +0000 Subject: [PATCH] No need to db_init_commands() early any more - it will happen on first entry to ddb. --- sys/ddb/db_command.c | 5 +++-- sys/ddb/db_command.h | 3 +-- sys/kern/init_main.c | 13 ++----------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 987551d0b002..7b376376e460 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_command.c,v 1.103 2007/10/01 22:01:38 martin Exp $ */ +/* $NetBSD: db_command.c,v 1.104 2007/10/01 22:05:15 martin Exp $ */ /* * Mach Operating System * Copyright (c) 1991,1990 Carnegie Mellon University @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.103 2007/10/01 22:01:38 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.104 2007/10/01 22:05:15 martin Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -177,6 +177,7 @@ static struct db_cmd_tbl_en db_mach_cmd_builtins = */ static bool db_ed_style = true; +static void db_init_commands(void); static int db_register_tbl_entry(uint8_t type, struct db_cmd_tbl_en *list_ent); static void db_cmd_list(const struct db_cmd_tbl_en_head *); diff --git a/sys/ddb/db_command.h b/sys/ddb/db_command.h index 62554fcd473f..190bb24db8c2 100644 --- a/sys/ddb/db_command.h +++ b/sys/ddb/db_command.h @@ -1,4 +1,4 @@ -/* $NetBSD: db_command.h,v 1.29 2007/09/23 23:55:54 martin Exp $ */ +/* $NetBSD: db_command.h,v 1.30 2007/10/01 22:05:15 martin Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc. @@ -69,7 +69,6 @@ #define _DDB_COMMAND_ void db_skip_to_eol(void); -void db_init_commands(void); void db_command_loop(void); void db_error(const char *) __attribute__((__noreturn__)); diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index f20ca0e58d17..cd8387d47241 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.317 2007/09/25 22:33:59 ad Exp $ */ +/* $NetBSD: init_main.c,v 1.318 2007/10/01 22:05:15 martin Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993 @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.317 2007/09/25 22:33:59 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.318 2007/10/01 22:05:15 martin Exp $"); #include "opt_ipsec.h" #include "opt_multiprocessor.h" @@ -175,11 +175,6 @@ __KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.317 2007/09/25 22:33:59 ad Exp $"); #endif /* PAX_MPROTECT || PAX_SEGVGUARD */ #include -#ifdef DDB -#include -#include -#endif - #include #include @@ -418,10 +413,6 @@ main(void) ntp_init(); #endif /* __HAVE_TIMECOUNTER */ -#ifdef DDB - db_init_commands(); -#endif - /* Initialize the device switch tables. */ devsw_init();