chiark / gitweb /
always expect KEY{value} on ATTR, ATTRS, ENV keys
authorKay Sievers <kay.sievers@suse.de>
Sun, 20 Aug 2006 17:08:37 +0000 (19:08 +0200)
committerKay Sievers <kay.sievers@suse.de>
Sun, 20 Aug 2006 17:08:37 +0000 (19:08 +0200)
udev_rules_parse.c

index b9456b5fb0fe21cc4046f40b511205bc81f2c1c6..5603ee1d11fa83a26578e09ed2a521dd9c7882fa 100644 (file)
@@ -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");
@@ -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");