diff options
author | Peter Wemm <peter@FreeBSD.org> | 2000-08-25 19:30:03 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2000-08-25 19:30:03 +0000 |
commit | 596feda554be877e7cd3338cf8e4879061e9b1b7 (patch) | |
tree | 11d872041308e4277ba85772a0a42ec520b895f0 /usr.sbin/config | |
parent | 6c243dd175e4660a75ba85bb41b643f9d53c8ff1 (diff) | |
download | src-596feda554be877e7cd3338cf8e4879061e9b1b7.tar.gz src-596feda554be877e7cd3338cf8e4879061e9b1b7.zip |
If a ${KERNEL}.hints file exists, and no hints are specified explicitly,
then include the hints with a marker indicating that it is a fallback.
The kernel side of this is to come shortly.
Notes
Notes:
svn path=/head/; revision=65091
Diffstat (limited to 'usr.sbin/config')
-rw-r--r-- | usr.sbin/config/config.h | 1 | ||||
-rw-r--r-- | usr.sbin/config/config.y | 6 | ||||
-rw-r--r-- | usr.sbin/config/configvers.h | 2 | ||||
-rw-r--r-- | usr.sbin/config/mkmakefile.c | 7 |
4 files changed, 14 insertions, 2 deletions
diff --git a/usr.sbin/config/config.h b/usr.sbin/config/config.h index 1779dc5a37b1..3964211bdfc0 100644 --- a/usr.sbin/config/config.h +++ b/usr.sbin/config/config.h @@ -131,6 +131,7 @@ struct opt_list { extern char *ident; extern char *hints; extern int do_trace; +extern int hintmode; char *get_word(FILE *); char *get_quoted_word(FILE *); diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y index 0de3e913aa20..5d12b9debf39 100644 --- a/usr.sbin/config/config.y +++ b/usr.sbin/config/config.y @@ -75,6 +75,7 @@ static struct device *curp = 0; struct device *dtab; char *ident; char *hints; +int hintmode; int yyline; struct file_list *ftab; char errbuf[80]; @@ -142,7 +143,10 @@ Config_spec: MAXUSERS NUMBER = { maxusers = $2; } | HINTS ID - = { hints = $2; }; + = { + hints = $2; + hintmode = 1; + }; System_spec: CONFIG System_id System_parameter_list diff --git a/usr.sbin/config/configvers.h b/usr.sbin/config/configvers.h index 7a398f5c712f..a797e64d5dc1 100644 --- a/usr.sbin/config/configvers.h +++ b/usr.sbin/config/configvers.h @@ -8,4 +8,4 @@ * * $FreeBSD$ */ -#define CONFIGVERS 500002 +#define CONFIGVERS 500003 diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c index 282378082ce2..bd110ecc2687 100644 --- a/usr.sbin/config/mkmakefile.c +++ b/usr.sbin/config/mkmakefile.c @@ -225,6 +225,13 @@ makefile(void) ofp = fopen(path("hints.c.new"), "w"); if (ofp == NULL) err(1, "%s", path("hints.c.new")); + if (hintmode == 0) { + snprintf(line, sizeof(line), "%s.hints", PREFIX); + ifp = fopen(line, "r"); + if (ifp) + hintmode = 2; + } + fprintf(ofp, "int hintmode = %d;\n", hintmode); fprintf(ofp, "char static_hints[] = {\n"); if (ifp) { while (fgets(line, BUFSIZ, ifp) != 0) { |