From 8bb39322f092fde89bf1082f51715a2f2da1c187 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sun, 20 Aug 2006 19:08:37 +0200 Subject: [PATCH] always expect KEY{value} on ATTR, ATTRS, ENV keys --- udev_rules_parse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/udev_rules_parse.c b/udev_rules_parse.c index b9456b5fb..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"); @@ -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"); -- 2.30.2