X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev_rules_parse.c;h=5603ee1d11fa83a26578e09ed2a521dd9c7882fa;hb=34bb5d057c99fa433392e0d5c17f604c8c111381;hp=ecb6a7be31b1133ab2a104c02dbcded411a13ba6;hpb=d0c8cb7d9c6e610a9f5ed840d023362c25413d7e;p=elogind.git diff --git a/udev_rules_parse.c b/udev_rules_parse.c index ecb6a7be3..5603ee1d1 100644 --- a/udev_rules_parse.c +++ b/udev_rules_parse.c @@ -321,7 +321,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena continue; } - if (strncasecmp(key, "ATTR", sizeof("ATTR")-1) == 0) { + if (strncasecmp(key, "ATTR{", sizeof("ATTR{")-1) == 0) { attr = get_key_attribute(key + sizeof("ATTR")-1); if (attr == NULL) { err("error parsing ATTR attribute"); @@ -345,7 +345,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena continue; } - if (strcasecmp(key, "SUBSYTEMS") == 0 || + if (strcasecmp(key, "SUBSYSTEMS") == 0 || strcasecmp(key, "BUS") == 0) { if (operation != KEY_OP_MATCH && operation != KEY_OP_NOMATCH) { @@ -368,8 +368,8 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena continue; } - if (strncasecmp(key, "ATTRS", sizeof("ATTRS")-1) == 0 || - strncasecmp(key, "SYSFS", sizeof("SYSFS")-1) == 0) { + if (strncasecmp(key, "ATTRS{", sizeof("ATTRS{")-1) == 0 || + strncasecmp(key, "SYSFS{", sizeof("SYSFS{")-1) == 0) { attr = get_key_attribute(key + sizeof("ATTRS")-1); if (attr == NULL) { err("error parsing ATTRS attribute"); @@ -381,7 +381,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena continue; } - if (strncasecmp(key, "ENV", sizeof("ENV")-1) == 0) { + if (strncasecmp(key, "ENV{", sizeof("ENV{")-1) == 0) { attr = get_key_attribute(key + sizeof("ENV")-1); if (attr == NULL) { err("error parsing ENV attribute");