From fdda2333fa7825d6a7461cadb6f07abd19e3ad39 Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 29 Feb 2004 16:56:54 +0000 Subject: Loudly announce WITNESS and DIAGNOSTIC options and warn about reduced performance. --- sys/kern/init_main.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 4e91f64..30c0d86 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -247,6 +247,20 @@ print_caddr_t(void *data __unused) SYSINIT(announce, SI_SUB_COPYRIGHT, SI_ORDER_FIRST, print_caddr_t, copyright) SYSINIT(version, SI_SUB_COPYRIGHT, SI_ORDER_SECOND, print_caddr_t, version) +#ifdef WITNESS +static char wit_warn[] = + "WARNING: WITNESS option enabled, expect reduced performance.\n"; +SYSINIT(witwarn, SI_SUB_COPYRIGHT, SI_ORDER_SECOND + 1, + print_caddr_t, wit_warn) +#endif + +#ifdef DIAGNOSTIC +static char diag_warn[] = + "WARNING: DIAGNOSTIC option enabled, expect reduced performance.\n"; +SYSINIT(diagwarn, SI_SUB_COPYRIGHT, SI_ORDER_SECOND + 2, + print_caddr_t, diag_warn) +#endif + static void set_boot_verbose(void *data __unused) { -- cgit v1.1