When the kernel is compiled with INVARIANTS, export that as

debug.invariants.

Differential Revision: https://reviews.freebsd.org/D3488
MFC after: 3 days
This commit is contained in:
Warner Losh 2015-08-26 23:58:03 +00:00
parent 6414db1bc4
commit 135342777c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=287183

View File

@ -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