summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-02-29 16:56:54 +0000
committerphk <phk@FreeBSD.org>2004-02-29 16:56:54 +0000
commitfdda2333fa7825d6a7461cadb6f07abd19e3ad39 (patch)
tree27ddeaca3c13daafb278999ecb34830b72cded3b
parentbc8fb9651973fa74a3c9d89c8a5922bd575574bc (diff)
downloadFreeBSD-src-fdda2333fa7825d6a7461cadb6f07abd19e3ad39.zip
FreeBSD-src-fdda2333fa7825d6a7461cadb6f07abd19e3ad39.tar.gz
Loudly announce WITNESS and DIAGNOSTIC options and warn about reduced
performance.
-rw-r--r--sys/kern/init_main.c14
1 files changed, 14 insertions, 0 deletions
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)
{
OpenPOWER on IntegriCloud