summaryrefslogtreecommitdiffstats
path: root/sbin/devd/parse.y
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-10-24 22:02:29 +0000
committerimp <imp@FreeBSD.org>2003-10-24 22:02:29 +0000
commitff0432665a0dc30bec1aa09d92ecfe2ac4d25f4d (patch)
treea73579281972ef4a2b53de9f6192b64289db292d /sbin/devd/parse.y
parent2fd31354d9e4c945cf1de39d75e7a45ba1ed36cc (diff)
downloadFreeBSD-src-ff0432665a0dc30bec1aa09d92ecfe2ac4d25f4d.zip
FreeBSD-src-ff0432665a0dc30bec1aa09d92ecfe2ac4d25f4d.tar.gz
Parse the ! lines that will soon be coming from the kernel. These are
a generalized notification mechanism for subsystems wishing to report events. Revieded by: njl # The kernel side seems like it might be causing panics for me, but should # be forthcoming shortly.
Diffstat (limited to 'sbin/devd/parse.y')
-rw-r--r--sbin/devd/parse.y9
1 files changed, 8 insertions, 1 deletions
diff --git a/sbin/devd/parse.y b/sbin/devd/parse.y
index cfc9313..9269ef2 100644
--- a/sbin/devd/parse.y
+++ b/sbin/devd/parse.y
@@ -47,7 +47,7 @@
%token <str> STRING
%token <str> ID
%token OPTIONS SET DIRECTORY PID_FILE DEVICE_NAME ACTION MATCH
-%token ATTACH DETACH NOMATCH
+%token ATTACH DETACH NOMATCH NOTIFY
%type <eventproc> match_or_action_list
%type <eps> match_or_action match action
@@ -69,6 +69,7 @@ config
| attach_block
| detach_block
| nomatch_block
+ | notify_block
;
option_block
@@ -115,6 +116,12 @@ nomatch_block
| NOMATCH NUMBER BEGINBLOCK ENDBLOCK SEMICOLON
;
+notify_block
+ : NOTIFY NUMBER BEGINBLOCK match_or_action_list ENDBLOCK SEMICOLON
+ { add_notify($2, $4); }
+ | NOTIFY NUMBER BEGINBLOCK ENDBLOCK SEMICOLON
+ ;
+
match_or_action_list
: match_or_action { $$ = add_to_event_proc( NULL, $1); }
| match_or_action_list match_or_action
OpenPOWER on IntegriCloud