diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-05-26 14:46:12 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2011-05-26 14:46:12 +0200 |
commit | 1eb037a7bf22b6e4f3a778d0fbbe16675b6df712 (patch) | |
tree | a07a4c778f7f91a62c3337ab5d5e45e481bf9b60 | |
parent | 19e47d97256390e4f42c5a4c96e26536d4d33e3e (diff) |
rules: support substitutions in TAG=
-rw-r--r-- | udev/udev-rules.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/udev/udev-rules.c b/udev/udev-rules.c index a77e1e223f..48395e7887 100644 --- a/udev/udev-rules.c +++ b/udev/udev-rules.c @@ -2526,11 +2526,15 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event } break; } - case TK_A_TAG: + case TK_A_TAG: { + char tag[UTIL_PATH_SIZE]; + + udev_event_apply_format(event, &rules->buf[cur->key.value_off], tag, sizeof(tag)); if (cur->key.op == OP_ASSIGN || cur->key.op == OP_ASSIGN_FINAL) udev_device_cleanup_tags_list(event->dev); - udev_device_add_tag(event->dev, &rules->buf[cur->key.value_off]); + udev_device_add_tag(event->dev, tag); break; + } case TK_A_NAME: { const char *name = &rules->buf[cur->key.value_off]; char name_str[UTIL_PATH_SIZE]; |