X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev_rules.h;h=75ffd5cb0f47b13ccb325910b7b979f896400384;hb=3632a3685883d3270145c59d5764de6246547943;hp=561ba1687d370d320ff9501bb6be7439c81e454e;hpb=db949b02489f521e32a052280f913e06b7c87e37;p=elogind.git diff --git a/udev_rules.h b/udev_rules.h index 561ba1687..75ffd5cb0 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" @@ -60,6 +62,7 @@ enum key_operation { KEY_OP_NOMATCH, KEY_OP_ADD, KEY_OP_ASSIGN, + KEY_OP_ASSIGN_FINAL, }; struct key_pair { @@ -75,6 +78,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]; @@ -91,10 +96,17 @@ struct udev_rule { int env_pair_count; char name[PATH_SIZE]; + enum key_operation name_operation; char symlink[PATH_SIZE]; + enum key_operation symlink_operation; char owner[USER_SIZE]; + enum key_operation owner_operation; char group[USER_SIZE]; + enum key_operation group_operation; mode_t mode; + enum key_operation mode_operation; + char run[PATH_SIZE]; + enum key_operation run_operation; int last_rule; int ignore_device; @@ -109,6 +121,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, struct sysfs_device *sysfs_device); extern void udev_rules_close(void); #endif