summaryrefslogtreecommitdiff
path: root/udev_rules_parse.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2006-08-20 18:16:27 +0200
committerKay Sievers <kay.sievers@suse.de>2006-08-20 18:16:27 +0200
commitd0c8cb7d9c6e610a9f5ed840d023362c25413d7e (patch)
tree3b76907049692a3854a99b65cdb9171a1e8ffe56 /udev_rules_parse.c
parent38895e573c6f17014393dc35a9e53d5f016172c3 (diff)
introduce ATTR{file}="value" to set sysfs attributes
Diffstat (limited to 'udev_rules_parse.c')
-rw-r--r--udev_rules_parse.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/udev_rules_parse.c b/udev_rules_parse.c
index d527bf4bad..ecb6a7be31 100644
--- a/udev_rules_parse.c
+++ b/udev_rules_parse.c
@@ -219,7 +219,7 @@ static int add_rule_key_pair(struct udev_rule *rule, struct key_pairs *pairs,
size_t key_len = strnlen(key, PATH_SIZE);
if (pairs->count >= PAIRS_MAX) {
- err("skip, too many keys in a single rule");
+ err("skip, too many keys of the same type in a single rule");
return -1;
}
@@ -322,11 +322,6 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena
}
if (strncasecmp(key, "ATTR", sizeof("ATTR")-1) == 0) {
- if (operation != KEY_OP_MATCH &&
- operation != KEY_OP_NOMATCH) {
- err("invalid ATTR operation");
- goto invalid;
- }
attr = get_key_attribute(key + sizeof("ATTR")-1);
if (attr == NULL) {
err("error parsing ATTR attribute");
@@ -375,11 +370,6 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena
if (strncasecmp(key, "ATTRS", sizeof("ATTRS")-1) == 0 ||
strncasecmp(key, "SYSFS", sizeof("SYSFS")-1) == 0) {
- if (operation != KEY_OP_MATCH &&
- operation != KEY_OP_NOMATCH) {
- err("invalid ATTRSS operation");
- goto invalid;
- }
attr = get_key_attribute(key + sizeof("ATTRS")-1);
if (attr == NULL) {
err("error parsing ATTRS attribute");