chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f408fd9
)
silence PHYSDEV* warning for WAIT_FOR* rules
author
Kay Sievers
<kay.sievers@vrfy.org>
Mon, 24 Nov 2008 20:24:04 +0000
(21:24 +0100)
committer
Kay Sievers
<kay.sievers@vrfy.org>
Mon, 24 Nov 2008 20:24:04 +0000
(21:24 +0100)
udev/udev-rules.c
patch
|
blob
|
history
diff --git
a/udev/udev-rules.c
b/udev/udev-rules.c
index df9fc7877da2c2d7bfa46f0ebb81e5a7b9d0f5da..afd2e884e9260324acb6e8b7cd4668293ec6ab30 100644
(file)
--- a/
udev/udev-rules.c
+++ b/
udev/udev-rules.c
@@
-1135,6
+1135,7
@@
static int add_rule(struct udev_rules *rules, char *line,
char *linepos;
char *attr;
int physdev = 0;
char *linepos;
char *attr;
int physdev = 0;
+ int waitfor = 0;
struct rule_tmp rule_tmp;
memset(&rule_tmp, 0x00, sizeof(struct rule_tmp));
struct rule_tmp rule_tmp;
memset(&rule_tmp, 0x00, sizeof(struct rule_tmp));
@@
-1395,6
+1396,7
@@
static int add_rule(struct udev_rules *rules, char *line,
if (strcasecmp(key, "WAIT_FOR") == 0 || strcasecmp(key, "WAIT_FOR_SYSFS") == 0) {
rule_add_key(&rule_tmp, TK_M_WAITFOR, 0, value, NULL);
valid = 1;
if (strcasecmp(key, "WAIT_FOR") == 0 || strcasecmp(key, "WAIT_FOR_SYSFS") == 0) {
rule_add_key(&rule_tmp, TK_M_WAITFOR, 0, value, NULL);
valid = 1;
+ waitfor = 1;
continue;
}
continue;
}
@@
-1544,11
+1546,11
@@
static int add_rule(struct udev_rules *rules, char *line,
err(rules->udev, "unknown key '%s' in %s:%u\n", key, filename, lineno);
}
err(rules->udev, "unknown key '%s' in %s:%u\n", key, filename, lineno);
}
- if (physdev)
- err(rules->udev, "PHYSDEV* values are deprecated and not available on recent kernels,
\n
"
- "please fix it in %s:%u", filename, lineno);
+ if (physdev
&& !waitfor
)
+ err(rules->udev, "PHYSDEV* values are deprecated and not available on recent kernels, "
+ "please fix it in %s:%u
\n
", filename, lineno);
- /* skip line if no
t any
valid key was found */
+ /* skip line if no valid key was found */
if (!valid)
goto invalid;
if (!valid)
goto invalid;