diff options
author | Kay Sievers <kay.sievers@suse.de> | 2006-09-18 02:01:29 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2006-09-18 02:01:29 +0200 |
commit | 091a660d43704cf2085f4dd8ffeb8463b8977657 (patch) | |
tree | d6443ed590494d3f1e8fdce0ff8a83754114d2f2 /udev_rules_parse.c | |
parent | fe0c4102add2b362e1e21ac591dc679ac18b2fce (diff) |
warn if a PHYSEDV* key, the "device" link, or a parent attribute is used
Diffstat (limited to 'udev_rules_parse.c')
-rw-r--r-- | udev_rules_parse.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/udev_rules_parse.c b/udev_rules_parse.c index 111fead9ad..bc16f72e2c 100644 --- a/udev_rules_parse.c +++ b/udev_rules_parse.c @@ -373,6 +373,12 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena err("error parsing ATTRS attribute"); goto invalid; } + 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) + 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) goto invalid; valid = 1; @@ -385,6 +391,9 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena err("error parsing ENV attribute"); goto invalid; } + if (strncmp(attr, "PHYSDEV", 7) == 0) + err("PHYSDEV* values are deprected and will be removed from a future kernel, " + "please fix it in %s:%u", filename, lineno); if (add_rule_key_pair(rule, &rule->env, operation, attr, value) != 0) goto invalid; valid = 1; |