diff options
Diffstat (limited to 'src/udev/udev-rules.c')
-rw-r--r-- | src/udev/udev-rules.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index c02295fbe2..093d68cf0c 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -1876,6 +1876,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event, usec_t timeout_usec, usec_t timeout_warn_usec, + struct udev_list *properties_list, const sigset_t *sigmask) { struct token *cur; struct token *rule; @@ -1941,7 +1942,18 @@ int udev_rules_apply_to_event(struct udev_rules *rules, const char *value; value = udev_device_get_property_value(event->dev, key_name); - if (value == NULL) + + /* check global properties */ + if (!value && properties_list) { + struct udev_list_entry *list_entry; + + list_entry = udev_list_get_entry(properties_list); + list_entry = udev_list_entry_get_by_name(list_entry, key_name); + if (list_entry != NULL) + value = udev_list_entry_get_value(list_entry); + } + + if (!value) value = ""; if (match_key(rules, cur, value)) goto nomatch; |