summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2006-09-18 22:14:18 +0200
committerKay Sievers <kay.sievers@suse.de>2006-09-18 22:14:18 +0200
commit7b5206d60917aeb8d2438b4022b2755b4eb5f126 (patch)
tree1075628086c76eacc6686eaea65d1030bb4257f5
parent091a660d43704cf2085f4dd8ffeb8463b8977657 (diff)
don't print PHYSDEV* warnings for old WAIT_FOR_SYSFS rules
-rw-r--r--udev_rules_parse.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/udev_rules_parse.c b/udev_rules_parse.c
index bc16f72e2c..a137331273 100644
--- a/udev_rules_parse.c
+++ b/udev_rules_parse.c
@@ -241,6 +241,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena
char *linepos;
char *attr;
size_t padding;
+ int physdev = 0;
int retval;
/* get all the keys */
@@ -392,8 +393,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena
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);
+ physdev = 1;
if (add_rule_key_pair(rule, &rule->env, operation, attr, value) != 0)
goto invalid;
valid = 1;
@@ -579,6 +579,10 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena
err("unknown key '%s' in %s:%u", key, filename, lineno);
}
+ if (physdev && rule->wait_for_sysfs.operation == KEY_OP_UNSET)
+ err("PHYSDEV* values are deprected and will be removed from a future kernel, "
+ "please fix it in %s:%u", filename, lineno);
+
/* skip line if not any valid key was found */
if (!valid)
goto invalid;