summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/config.y
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-02-26 23:36:59 +0000
committerru <ru@FreeBSD.org>2003-02-26 23:36:59 +0000
commitc51d1047697351c2d3d67d9c005688407cc2da25 (patch)
tree24f5646a6a12f22ba761c4910b02c1dd2fc0fdc8 /usr.sbin/config/config.y
parentc350585bc92efaf445e425df456ba5de1113b40d (diff)
downloadFreeBSD-src-c51d1047697351c2d3d67d9c005688407cc2da25.zip
FreeBSD-src-c51d1047697351c2d3d67d9c005688407cc2da25.tar.gz
Implemented "nooption" and "nomakeoption" config(8) tokens.
Fixed memory leak in the "nodevice" option implementation. Use these instead of sed(1) in MD NOTES. Use a single makefile (sys/conf/makeLINT.mk) to generate LINT for all architectures. (Previous versions missed the LINT dependency on Makefile, and i386 version also missed the dependency on ${NOTES}.) Fixed bugs in the previous NOTES conversion using the "nodevice" token and sed(1): - i386 LINT lost "device pst". - pc98 LINT lost SC_*, MAXCONS and KBD_DISABLE_KEYMAP_LOAD options, and got needless DPT_* options. - Added nooptions PPC_DEBUG, PPC_PROBE_CHIPSET, KBD_INSTALL_CDEV to sparc64 LINT so that it has a chance to config(8). This basically returns us to where we were before.
Diffstat (limited to 'usr.sbin/config/config.y')
-rw-r--r--usr.sbin/config/config.y13
1 files changed, 11 insertions, 2 deletions
diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y
index c95ede9..94b3c34 100644
--- a/usr.sbin/config/config.y
+++ b/usr.sbin/config/config.y
@@ -9,15 +9,17 @@
%token CONFIG
%token CPU
%token DEVICE
+%token NODEVICE
%token ENV
%token EQUALS
%token HINTS
%token IDENT
%token MAXUSERS
-%token NODEVICE
%token PROFILE
%token OPTIONS
+%token NOOPTION
%token MAKEOPTIONS
+%token NOMAKEOPTION
%token SEMICOLON
%token INCLUDE
@@ -136,8 +138,12 @@ Config_spec:
} |
OPTIONS Opt_list
|
+ NOOPTION Save_id
+ = { rmopt(&opt, $2); } |
MAKEOPTIONS Mkopt_list
|
+ NOMAKEOPTION Save_id
+ = { rmopt(&mkopt, $2); } |
IDENT ID
= { ident = $2; } |
System_spec
@@ -248,7 +254,10 @@ Device_spec:
} |
NODEVICE Dev
= {
- rmopt(&opt, devopt($2));
+ char *s = devopt($2);
+
+ rmopt(&opt, s);
+ free(s);
/* and the device part */
rmdev($2);
} ;
OpenPOWER on IntegriCloud