summaryrefslogtreecommitdiff
path: root/udev_rules.h
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-04-02 17:45:35 +0200
committerGreg KH <gregkh@suse.de>2005-04-26 23:55:00 -0700
commit821d0ec803a72841f173739f5b713fe847edab75 (patch)
tree4866ffc8b8c367cd6e62fd0616fffde01757e3e7 /udev_rules.h
parente03a196a0d0680868ea230ab8f8d100ee90d0fa4 (diff)
[PATCH] add RUN key to be able to run rule based notification
SUBSYSTEM=="block", RUN="/sbin/program" will execute the program only for block device events. ACTION="remove", SUBSYSTEM=="block", RUN"/sbin/program" will execute the program, if a block device is removed.
Diffstat (limited to 'udev_rules.h')
-rw-r--r--udev_rules.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/udev_rules.h b/udev_rules.h
index 561ba1687d..5fba2d5571 100644
--- a/udev_rules.h
+++ b/udev_rules.h
@@ -30,6 +30,7 @@
#define KEY_KERNEL "KERNEL"
#define KEY_SUBSYSTEM "SUBSYSTEM"
+#define KEY_ACTION "ACTION"
#define KEY_BUS "BUS"
#define KEY_ID "ID"
#define KEY_PROGRAM "PROGRAM"
@@ -42,6 +43,7 @@
#define KEY_OWNER "OWNER"
#define KEY_GROUP "GROUP"
#define KEY_MODE "MODE"
+#define KEY_RUN "RUN"
#define KEY_OPTIONS "OPTIONS"
#define OPTION_LAST_RULE "last_rule"
@@ -75,6 +77,8 @@ struct udev_rule {
enum key_operation kernel_operation;
char subsystem[NAME_SIZE];
enum key_operation subsystem_operation;
+ char action[NAME_SIZE];
+ enum key_operation action_operation;
char bus[NAME_SIZE];
enum key_operation bus_operation;
char id[NAME_SIZE];
@@ -95,6 +99,7 @@ struct udev_rule {
char owner[USER_SIZE];
char group[USER_SIZE];
mode_t mode;
+ char run[PATH_SIZE];
int last_rule;
int ignore_device;
@@ -109,6 +114,7 @@ extern struct list_head udev_rule_list;
extern int udev_rules_init(void);
extern int udev_rules_get_name(struct udevice *udev, struct sysfs_class_device *class_dev);
+extern int udev_rules_get_run(struct udevice *udev);
extern void udev_rules_close(void);
#endif