summaryrefslogtreecommitdiff
path: root/udev_rules_parse.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-06-01 16:37:43 +0200
committerKay Sievers <kay.sievers@vrfy.org>2007-06-01 16:37:43 +0200
commitd419e96238f295996f5b8fc1743ab4835f62fcc2 (patch)
treee1e3998e15e52d89912004246ce42cf52f8bf7b4 /udev_rules_parse.c
parentfd40749e68c000f9d80083a5bcdb8183bac4bfdf (diff)
fix "do not access parent" warning for ATTR{}
Diffstat (limited to 'udev_rules_parse.c')
-rw-r--r--udev_rules_parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/udev_rules_parse.c b/udev_rules_parse.c
index bfbad367e9..02bddbd0a8 100644
--- a/udev_rules_parse.c
+++ b/udev_rules_parse.c
@@ -376,7 +376,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena
if (strncmp(attr, "device/", 7) == 0)
err("the 'device' link is deprecated and will be removed from a future kernel, "
"please fix it in %s:%u", filename, lineno);
- else if (strchr(attr, '/') != NULL)
+ else if (strstr(attr, "../") != NULL)
err("do not reference parent sysfs directories directly, that may break with a future kernel, "
"please fix it in %s:%u", filename, lineno);
if (add_rule_key_pair(rule, &rule->attrs, operation, attr, value) != 0)