diff options
author | ru <ru@FreeBSD.org> | 2003-02-26 23:36:59 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2003-02-26 23:36:59 +0000 |
commit | c51d1047697351c2d3d67d9c005688407cc2da25 (patch) | |
tree | 24f5646a6a12f22ba761c4910b02c1dd2fc0fdc8 | |
parent | c350585bc92efaf445e425df456ba5de1113b40d (diff) | |
download | FreeBSD-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.
-rw-r--r-- | sys/alpha/conf/Makefile | 10 | ||||
-rw-r--r-- | sys/amd64/conf/Makefile | 10 | ||||
-rw-r--r-- | sys/conf/makeLINT.mk | 11 | ||||
-rw-r--r-- | sys/conf/makeLINT.sed | 2 | ||||
-rw-r--r-- | sys/i386/conf/Makefile | 10 | ||||
-rw-r--r-- | sys/i386/conf/NOTES | 5 | ||||
-rw-r--r-- | sys/pc98/conf/Makefile | 41 | ||||
-rw-r--r-- | sys/pc98/conf/NOTES | 22 | ||||
-rw-r--r-- | sys/sparc64/conf/Makefile | 42 | ||||
-rw-r--r-- | sys/sparc64/conf/NOTES | 46 | ||||
-rw-r--r-- | usr.sbin/config/config.y | 13 | ||||
-rw-r--r-- | usr.sbin/config/lang.l | 4 |
12 files changed, 104 insertions, 112 deletions
diff --git a/sys/alpha/conf/Makefile b/sys/alpha/conf/Makefile index 08947a9..2c006e9 100644 --- a/sys/alpha/conf/Makefile +++ b/sys/alpha/conf/Makefile @@ -1,11 +1,3 @@ # $FreeBSD$ -all: - @echo "make LINT only" - -clean: - rm -f LINT - -NOTES= ../../conf/NOTES NOTES -LINT: ${NOTES} ../../conf/makeLINT.sed - cat ${NOTES} | sed -E -n -f ../../conf/makeLINT.sed > ${.TARGET} +.include "${.CURDIR}/../../conf/makeLINT.mk" diff --git a/sys/amd64/conf/Makefile b/sys/amd64/conf/Makefile index 674f686..2c006e9 100644 --- a/sys/amd64/conf/Makefile +++ b/sys/amd64/conf/Makefile @@ -1,11 +1,3 @@ # $FreeBSD$ -all: - @echo "make LINT only" - -clean: - rm -f LINT - -NOTES= ../../conf/NOTES NOTES -LINT: ../../conf/makeLINT.sed - cat ${NOTES} | sed -E -n -f ../../conf/makeLINT.sed > ${.TARGET} +.include "${.CURDIR}/../../conf/makeLINT.mk" diff --git a/sys/conf/makeLINT.mk b/sys/conf/makeLINT.mk new file mode 100644 index 0000000..08947a9 --- /dev/null +++ b/sys/conf/makeLINT.mk @@ -0,0 +1,11 @@ +# $FreeBSD$ + +all: + @echo "make LINT only" + +clean: + rm -f LINT + +NOTES= ../../conf/NOTES NOTES +LINT: ${NOTES} ../../conf/makeLINT.sed + cat ${NOTES} | sed -E -n -f ../../conf/makeLINT.sed > ${.TARGET} diff --git a/sys/conf/makeLINT.sed b/sys/conf/makeLINT.sed index f328f76..83445cf 100644 --- a/sys/conf/makeLINT.sed +++ b/sys/conf/makeLINT.sed @@ -1,7 +1,7 @@ #!/usr/bin/sed -E -n -f # $FreeBSD$ -/^(machine|ident|device|nodevice|makeoptions|options|profile|cpu|option|maxusers)[[:space:]]/ { +/^(machine|ident|device|nodevice|makeoptions|nomakeoption|options|option|nooption|profile|cpu|maxusers)[[:space:]]/ { s/[[:space:]]*#.*$// p } diff --git a/sys/i386/conf/Makefile b/sys/i386/conf/Makefile index 674f686..2c006e9 100644 --- a/sys/i386/conf/Makefile +++ b/sys/i386/conf/Makefile @@ -1,11 +1,3 @@ # $FreeBSD$ -all: - @echo "make LINT only" - -clean: - rm -f LINT - -NOTES= ../../conf/NOTES NOTES -LINT: ../../conf/makeLINT.sed - cat ${NOTES} | sed -E -n -f ../../conf/makeLINT.sed > ${.TARGET} +.include "${.CURDIR}/../../conf/makeLINT.mk" diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index 09bb79c..55ccc86 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -557,6 +557,11 @@ device pca hint.pca.0.at="isa" hint.pca.0.port="0x040" +# +# ATA raid adapters +# +device pst + # # SCSI host adapters: # diff --git a/sys/pc98/conf/Makefile b/sys/pc98/conf/Makefile index 76e35a1..2c006e9 100644 --- a/sys/pc98/conf/Makefile +++ b/sys/pc98/conf/Makefile @@ -1,42 +1,3 @@ # $FreeBSD$ -all: - @echo "make LINT only" - -clean: - rm -f LINT - -NOTES= ../../conf/NOTES NOTES -LINT: ${NOTES} ../../conf/makeLINT.sed - cat ${NOTES} | sed -E -n -f ../../conf/makeLINT.sed \ - | sed -e /VGA_DEBUG/d \ - -e /SC_RENDER_DEBUG/d \ - -e /SC_DEBUG_LEVEL/d \ - -e /SC_NO_SUSPEND_VTYSWITCH/d \ - -e /SC_NO_SYSMOUSE/d \ - -e /SC_NO_HISTORY/d \ - -e /SC_NO_FONT_LOADING/d \ - -e /SC_NO_CUTPASTE/d \ - -e /SC_TWOBUTTON_MOUSE/d \ - -e /SC_CUT_SEPCHARS/d \ - -e /SC_CUT_SPACES2TABS/d \ - -e /SC_KERNEL_CONS_REV_ATTR/d \ - -e /SC_KERNEL_CONS_ATTR/d \ - -e /SC_NORM_REV_ATTR/d \ - -e /SC_NORM_ATTR/d \ - -e /SC_PIXEL_MODE/d \ - -e /SC_MOUSE_CHAR/d \ - -e /SC_HISTORY_SIZE/d \ - -e /SC_DISABLE_REBOOT/d \ - -e /SC_DISABLE_DDBKEY/d \ - -e /SC_DFLT_FONT/d \ - -e /SC_ALT_MOUSE_IMAGE/d \ - -e /MAXCONS/d \ - -e /VGA_WIDTH90/d \ - -e /VGA_SLOW_IOACCESS/d \ - -e /VGA_ALT_SEQACCESS/d \ - -e /PSM_RESETAFTERSUSPEND/d \ - -e /PSM_HOOKRESUME/d \ - -e /KBD_DISABLE_KEYMAP_LOAD/d \ - -e /ATKBD_DFLT_KEYMAP/d \ - > LINT +.include "${.CURDIR}/../../conf/makeLINT.mk" diff --git a/sys/pc98/conf/NOTES b/sys/pc98/conf/NOTES index ea6262a..cc5ec750 100644 --- a/sys/pc98/conf/NOTES +++ b/sys/pc98/conf/NOTES @@ -979,3 +979,25 @@ nodevice twe # 3ware ATA RAID nodevice cbb nodevice pccard nodevice cardbus + + +##################################################################### +# Options we don't want to deal with + +nooption VGA_DEBUG +nooption VGA_WIDTH90 +nooption VGA_SLOW_IOACCESS +nooption VGA_ALT_SEQACCESS +nooption PSM_RESETAFTERSUSPEND +nooption PSM_HOOKRESUME +nooption ATKBD_DFLT_KEYMAP +nooption DPT_ALLOW_MEMIO +nooption DPT_LOST_IRQ +nooption DPT_RESET_HBA +nooption DPT_TIMEOUT_FACTOR + + +##################################################################### +# Make options we don't want to deal with + +nomakeoption ATKBD_DFLT_KEYMAP diff --git a/sys/sparc64/conf/Makefile b/sys/sparc64/conf/Makefile index c05af2c..2c006e9 100644 --- a/sys/sparc64/conf/Makefile +++ b/sys/sparc64/conf/Makefile @@ -1,43 +1,3 @@ # $FreeBSD$ -all: - @echo "make LINT only" - -clean: - rm -f LINT - -NOTES= ../../conf/NOTES NOTES -LINT: ${NOTES} ../../conf/makeLINT.sed - cat ${NOTES} | sed -E -n -f ../../conf/makeLINT.sed \ - | sed -e /VGA_DEBUG/d \ - -e /SC_RENDER_DEBUG/d \ - -e /SC_DEBUG_LEVEL/d \ - -e /SC_NO_SUSPEND_VTYSWITCH/d \ - -e /SC_NO_SYSMOUSE/d \ - -e /SC_NO_HISTORY/d \ - -e /SC_NO_FONT_LOADING/d \ - -e /SC_NO_CUTPASTE/d \ - -e /SC_TWOBUTTON_MOUSE/d \ - -e /SC_CUT_SEPCHARS/d \ - -e /SC_CUT_SPACES2TABS/d \ - -e /SC_KERNEL_CONS_REV_ATTR/d \ - -e /SC_KERNEL_CONS_ATTR/d \ - -e /SC_NORM_REV_ATTR/d \ - -e /SC_NORM_ATTR/d \ - -e /SC_PIXEL_MODE/d \ - -e /SC_MOUSE_CHAR/d \ - -e /SC_HISTORY_SIZE/d \ - -e /SC_DISABLE_REBOOT/d \ - -e /SC_DISABLE_DDBKEY/d \ - -e /SC_DFLT_FONT/d \ - -e /SC_ALT_MOUSE_IMAGE/d \ - -e /MAXCONS/d \ - -e /VGA_WIDTH90/d \ - -e /VGA_SLOW_IOACCESS/d \ - -e /VGA_ALT_SEQACCESS/d \ - -e /PSM_RESETAFTERSUSPEND/d \ - -e /PSM_HOOKRESUME/d \ - -e /KBD_DISABLE_KEYMAP_LOAD/d \ - -e /ATKBD_DFLT_KEYMAP/d \ - -e /EXT2FS/d \ - > ${.TARGET} +.include "${.CURDIR}/../../conf/makeLINT.mk" diff --git a/sys/sparc64/conf/NOTES b/sys/sparc64/conf/NOTES index 4f3bfc3..0af3eb0 100644 --- a/sys/sparc64/conf/NOTES +++ b/sys/sparc64/conf/NOTES @@ -82,3 +82,49 @@ nodevice bt nodevice wds nodevice ep nodevice ex + + +##################################################################### +# Options we don't want to deal with + +nooption VGA_DEBUG +nooption SC_RENDER_DEBUG +nooption SC_DEBUG_LEVEL +nooption PPC_DEBUG +nooption PPC_PROBE_CHIPSET +nooption SC_NO_SUSPEND_VTYSWITCH +nooption SC_NO_SYSMOUSE +nooption SC_NO_HISTORY +nooption SC_NO_FONT_LOADING +nooption SC_NO_CUTPASTE +nooption SC_TWOBUTTON_MOUSE +nooption SC_CUT_SEPCHARS +nooption SC_CUT_SPACES2TABS +nooption SC_KERNEL_CONS_REV_ATTR +nooption SC_KERNEL_CONS_ATTR +nooption SC_NORM_REV_ATTR +nooption SC_NORM_ATTR +nooption SC_PIXEL_MODE +nooption SC_MOUSE_CHAR +nooption SC_HISTORY_SIZE +nooption SC_DISABLE_REBOOT +nooption SC_DISABLE_DDBKEY +nooption SC_DFLT_FONT +nooption SC_ALT_MOUSE_IMAGE +nooption MAXCONS +nooption VGA_WIDTH90 +nooption VGA_SLOW_IOACCESS +nooption VGA_ALT_SEQACCESS +nooption PSM_RESETAFTERSUSPEND +nooption PSM_HOOKRESUME +nooption KBD_INSTALL_CDEV +nooption KBD_DISABLE_KEYMAP_LOAD +nooption ATKBD_DFLT_KEYMAP +nooption EXT2FS + + +##################################################################### +# Make options we don't want to deal with + +nomakeoption SC_DFLT_FONT +nomakeoption ATKBD_DFLT_KEYMAP 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); } ; diff --git a/usr.sbin/config/lang.l b/usr.sbin/config/lang.l index 6884bd1..e5c0c98 100644 --- a/usr.sbin/config/lang.l +++ b/usr.sbin/config/lang.l @@ -67,16 +67,18 @@ struct kt { { "config", CONFIG }, { "cpu", CPU }, { "device", DEVICE }, + { "nodevice", NODEVICE }, { "env", ENV }, { "hints", HINTS }, { "ident", IDENT }, { "machine", ARCH }, /* MACHINE is defined in /sys/param.h */ { "makeoptions", MAKEOPTIONS }, + { "nomakeoption", NOMAKEOPTION }, { "maxusers", MAXUSERS }, - { "nodevice", NODEVICE }, { "profile", PROFILE }, { "option", OPTIONS }, { "options", OPTIONS }, + { "nooption", NOOPTION }, { "include", INCLUDE }, { 0, 0 }, }; |