diff options
author | peter <peter@FreeBSD.org> | 2000-08-25 19:30:03 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-08-25 19:30:03 +0000 |
commit | 05f5722996e56400bf60b8832a0fbe52f93b9fd8 (patch) | |
tree | 4d488faff6a56993fded2082bf89ad9775c86099 | |
parent | ba486c0c62def30ebc2271540fd96400f9909a3f (diff) | |
download | FreeBSD-src-05f5722996e56400bf60b8832a0fbe52f93b9fd8.zip FreeBSD-src-05f5722996e56400bf60b8832a0fbe52f93b9fd8.tar.gz |
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.
-rw-r--r-- | sys/conf/Makefile.alpha | 2 | ||||
-rw-r--r-- | sys/conf/Makefile.i386 | 2 | ||||
-rw-r--r-- | sys/conf/Makefile.pc98 | 2 | ||||
-rw-r--r-- | sys/conf/Makefile.powerpc | 2 | ||||
-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 |
8 files changed, 18 insertions, 6 deletions
diff --git a/sys/conf/Makefile.alpha b/sys/conf/Makefile.alpha index 87559ce..1798e88 100644 --- a/sys/conf/Makefile.alpha +++ b/sys/conf/Makefile.alpha @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500002 +%VERSREQ= 500003 # Can be overridden by makeoptions or /etc/make.conf KERNEL?= kernel diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386 index 8bbb953..acf5001 100644 --- a/sys/conf/Makefile.i386 +++ b/sys/conf/Makefile.i386 @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500002 +%VERSREQ= 500003 # Can be overridden by makeoptions or /etc/make.conf KERNEL?= kernel diff --git a/sys/conf/Makefile.pc98 b/sys/conf/Makefile.pc98 index 2f52ccb..7eab4e6 100644 --- a/sys/conf/Makefile.pc98 +++ b/sys/conf/Makefile.pc98 @@ -19,7 +19,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500002 +%VERSREQ= 500003 # Can be overridden by makeoptions or /etc/make.conf KERNEL?= kernel diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc index 8bbb953..acf5001 100644 --- a/sys/conf/Makefile.powerpc +++ b/sys/conf/Makefile.powerpc @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500002 +%VERSREQ= 500003 # Can be overridden by makeoptions or /etc/make.conf KERNEL?= kernel diff --git a/usr.sbin/config/config.h b/usr.sbin/config/config.h index 1779dc5..3964211 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 0de3e91..5d12b9d 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 7a398f5..a797e64 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 2823780..bd110ec 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) { |