X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev_rules_parse.c;h=57c797dd31bfb34f351fee53b892dc68f751c4a0;hb=60d7b201008edb3c6d9226ef336c7ae0daa5742f;hp=3f07521ccb81210994cb93a0117d1cb234317cd5;hpb=c974742bf4d6d8fab1e1c90e2e57dae0a2f297a1;p=elogind.git diff --git a/udev_rules_parse.c b/udev_rules_parse.c index 3f07521cc..57c797dd3 100644 --- a/udev_rules_parse.c +++ b/udev_rules_parse.c @@ -349,21 +349,19 @@ static int rules_parse(const char *filename) if (strncasecmp(key, KEY_NAME, sizeof(KEY_NAME)-1) == 0) { attr = get_key_attribute(key + sizeof(KEY_NAME)-1); - /* FIXME: remove old style options and make OPTIONS= mandatory */ if (attr != NULL) { if (strstr(attr, OPTION_PARTITIONS) != NULL) { dbg("creation of partition nodes requested"); rule.partitions = DEFAULT_PARTITIONS_COUNT; } + /* FIXME: remove old style option and make OPTIONS= mandatory */ if (strstr(attr, OPTION_IGNORE_REMOVE) != NULL) { dbg("remove event should be ignored"); rule.ignore_remove = 1; } } - if (value[0] != '\0') - strlcpy(rule.name, value, sizeof(rule.name)); - else - rule.ignore_device = 1; + rule.name_operation = operation; + strlcpy(rule.name, value, sizeof(rule.name)); valid = 1; continue; }