chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] allow to match against empty key values
[elogind.git]
/
udev_rules_parse.c
diff --git
a/udev_rules_parse.c
b/udev_rules_parse.c
index 71ca4827288daca318dc9ba81ca5554ea93c0385..3c1631ab49c54590bd1cf86fb0e75d1d6ca127f7 100644
(file)
--- a/
udev_rules_parse.c
+++ b/
udev_rules_parse.c
@@
-236,7
+236,7
@@
static int rules_parse(const char *filename)
while (1) {
char *key;
char *value;
while (1) {
char *key;
char *value;
- enum key_operation operation = KEY_OP_UN
KNOWN
;
+ enum key_operation operation = KEY_OP_UN
SET
;
retval = get_key(&linepos, &key, &operation, &value);
if (retval)
retval = get_key(&linepos, &key, &operation, &value);
if (retval)
@@
-408,13
+408,6
@@
static int rules_parse(const char *filename)
if (!valid)
goto error;
if (!valid)
goto error;
- /* simple plausibility checks for given keys */
- if ((rule.sysfs_pair[0].name[0] == '\0') ^
- (rule.sysfs_pair[0].value[0] == '\0')) {
- err("inconsistency in " KEY_SYSFS " key");
- goto error;
- }
-
if ((rule.result[0] != '\0') && (program_given == 0)) {
info(KEY_RESULT " is only useful when " KEY_PROGRAM " is called in any rule before");
goto error;
if ((rule.result[0] != '\0') && (program_given == 0)) {
info(KEY_RESULT " is only useful when " KEY_PROGRAM " is called in any rule before");
goto error;