summaryrefslogtreecommitdiffstats
path: root/sbin/devd
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-05-15 02:23:32 +0000
committerimp <imp@FreeBSD.org>2003-05-15 02:23:32 +0000
commite01c3427e31ddc022acd55593e818815c036618c (patch)
tree579f54304d6a0ea8972a54088d31d913ac499c4c /sbin/devd
parent497f0337b3b7a3ebac0b80e3f7f7301f74b28cea (diff)
downloadFreeBSD-src-e01c3427e31ddc022acd55593e818815c036618c.zip
FreeBSD-src-e01c3427e31ddc022acd55593e818815c036618c.tar.gz
Allow zero or more actions in an action list, rather than requiring
one or more actions in the list. This makes constructs like: attach 10 { // echo "Driver $device_name attached" }; to be accepted by the parser. It will be treated as if the user had entered: // attach 10 { // echo "Driver $device_name attached" // }; (eg totally ignored). Approved by: re@ (rwatson)
Diffstat (limited to 'sbin/devd')
-rw-r--r--sbin/devd/parse.y3
1 files changed, 3 insertions, 0 deletions
diff --git a/sbin/devd/parse.y b/sbin/devd/parse.y
index 4a8f4dd..cfc9313 100644
--- a/sbin/devd/parse.y
+++ b/sbin/devd/parse.y
@@ -100,16 +100,19 @@ set_option
attach_block
: ATTACH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON
{ add_attach($2, $4); }
+ | ATTACH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON
;
detach_block
: DETACH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON
{ add_detach($2, $4); }
+ | DETACH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON
;
nomatch_block
: NOMATCH NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON
{ add_nomatch($2, $4); }
+ | NOMATCH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON
;
match_or_action_list
OpenPOWER on IntegriCloud