aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2004-10-24 10:27:16 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2004-10-24 10:27:16 +0000
commit30fdf276fb11180c274a4def8373358aae673301 (patch)
treecff281857c15a92bef5fe300623d56de865cb7a8 /usr.sbin
parent5eded4f3d0f6db6ade1db56c7ecc6642143b9848 (diff)
downloadsrc-30fdf276fb11180c274a4def8373358aae673301.tar.gz
src-30fdf276fb11180c274a4def8373358aae673301.zip
Allow multiple devices to be specified on one device / nodevice line.
Also allow "device" / "nodevice" to be spelled "devices" / "nodevices". MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=136880
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/config/config.y34
1 files changed, 27 insertions, 7 deletions
diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y
index 47b256809dc2..77a17fcf386b 100644
--- a/usr.sbin/config/config.y
+++ b/usr.sbin/config/config.y
@@ -246,20 +246,40 @@ Dev:
;
Device_spec:
- DEVICE Dev
+ DEVICE Dev_list
+ |
+ NODEVICE NoDev_list
+ ;
+
+Dev_list:
+ Dev_list COMMA Device
+ |
+ Device
+ ;
+
+NoDev_list:
+ NoDev_list COMMA NoDevice
+ |
+ NoDevice
+ ;
+
+Device:
+ Dev
= {
- newopt(&opt, devopt($2), ns("1"));
+ newopt(&opt, devopt($1), ns("1"));
/* and the device part */
- newdev($2);
- } |
- NODEVICE Dev
+ newdev($1);
+ }
+
+NoDevice:
+ Dev
= {
- char *s = devopt($2);
+ char *s = devopt($1);
rmopt(&opt, s);
free(s);
/* and the device part */
- rmdev($2);
+ rmdev($1);
} ;
%%