summaryrefslogtreecommitdiffstats
path: root/sbin/devd/parse.y
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-07-10 03:37:15 +0000
committerimp <imp@FreeBSD.org>2005-07-10 03:37:15 +0000
commit68644ee7c20ae551f423483008f4f216eb31d6a5 (patch)
tree97e1fe11117d1944009f6913219eba532675f70d /sbin/devd/parse.y
parent983982e20ac5470784e75ec16d45a9cbce75b15f (diff)
downloadFreeBSD-src-68644ee7c20ae551f423483008f4f216eb31d6a5.zip
FreeBSD-src-68644ee7c20ae551f423483008f4f216eb31d6a5.tar.gz
Add the ability to match the on a media type of the device in question.
Submitted by: sam Approved by: re (scottl)
Diffstat (limited to 'sbin/devd/parse.y')
-rw-r--r--sbin/devd/parse.y8
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/devd/parse.y b/sbin/devd/parse.y
index 9269ef2..28b8a90 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 NOTIFY
+%token ATTACH DETACH NOMATCH NOTIFY MEDIA_TYPE CLASS SUBDEVICE
%type <eventproc> match_or_action_list
%type <eps> match_or_action match action
@@ -137,6 +137,12 @@ match
: MATCH STRING STRING SEMICOLON { $$ = new_match($2, $3); }
| DEVICE_NAME STRING SEMICOLON
{ $$ = new_match(strdup("device-name"), $2); }
+ | MEDIA_TYPE STRING SEMICOLON
+ { $$ = new_media(strdup("media-type"), $2); }
+ | CLASS STRING SEMICOLON
+ { $$ = new_match(strdup("class"), $2); }
+ | SUBDEVICE STRING SEMICOLON
+ { $$ = new_match(strdup("subdevice"), $2); }
;
action
OpenPOWER on IntegriCloud