Handle !INCLUDE_CONFIG_FILE entirely in the kernel. This should make some

developers happy, since it will let them to use old config(8) with newer
kernels.

Reviewed by:	imp
Approved by:	imp
This commit is contained in:
Wojciech A. Koszek 2007-05-16 16:08:04 +00:00
parent e829ed67a2
commit 5f9974ae57
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169604
2 changed files with 9 additions and 4 deletions

View File

@ -39,6 +39,7 @@
__FBSDID("$FreeBSD$");
#include "opt_posix.h"
#include "opt_config.h"
#include <sys/param.h>
#include <sys/kernel.h>
@ -296,8 +297,12 @@ SYSCTL_PROC(_kern, KERN_SECURELVL, securelevel,
CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_PRISON, 0, 0, sysctl_kern_securelvl,
"I", "Current secure level");
#ifdef INCLUDE_CONFIG_FILE
/* Actual kernel configuration options. */
extern char kernconfstring[];
#else
char kernconfstring[] = "\0";
#endif
static int
sysctl_kern_config(SYSCTL_HANDLER_ARGS)

View File

@ -7,11 +7,11 @@
#include "opt_config.h"
#ifdef INCLUDE_CONFIG_FILE
/*
* For !INCLUDE_CONFIG_FILE case, you should look at kern_mib.c. This is
* where kernconfstring is defined then.
*/
const char kernconfstring[] __attribute__ ((section("kern_conf"))) =
"%%KERNCONFFILE%%";
#else
const char kernconfstring[] = "\0";
#endif /* INCLUDE_CONFIG_FILE */