diff options
author | imp <imp@FreeBSD.org> | 2015-08-26 23:58:03 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2015-08-26 23:58:03 +0000 |
commit | b82b5280a125237c8e88f66e7beae3a5925da9c3 (patch) | |
tree | 84f35f5ba3f71b1d1b0d906df72e847ff9ea5422 /sys/kern/init_main.c | |
parent | 4c1edcc0740486fd6b30a0e53dd89199de14acc8 (diff) | |
download | FreeBSD-src-b82b5280a125237c8e88f66e7beae3a5925da9c3.zip FreeBSD-src-b82b5280a125237c8e88f66e7beae3a5925da9c3.tar.gz |
When the kernel is compiled with INVARIANTS, export that as
debug.invariants.
Differential Revision: https://reviews.freebsd.org/D3488
MFC after: 3 days
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r-- | sys/kern/init_main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index efb7317..2f83d81 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -117,6 +117,15 @@ int bootverbose = BOOTVERBOSE; SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, &bootverbose, 0, "Control the output of verbose kernel messages"); +/* Want to avoid defining INVARIANTS if not already defined */ +#ifdef INVARIANTS +static int invariants = 1; +#else +static int invariants = 0; +#endif +SYSCTL_INT(_debug, OID_AUTO, invariants, CTLFLAG_RD, &invariants, 0, + "Kernel compiled with invariants"); + /* * This ensures that there is at least one entry so that the sysinit_set * symbol is not undefined. A sybsystem ID of SI_SUB_DUMMY is never |