break;
if (linepos[0] == '=')
break;
- if (linepos[0] == '+')
- break;
- if (linepos[0] == '!')
- break;
- if (linepos[0] == ':')
- break;
+ if ((linepos[0] == '+') || (linepos[0] == '!') || (linepos[0] == ':'))
+ if (linepos[1] == '=')
+ break;
}
/* remember end of key */
}
if (strcasecmp(key, "DRIVER") == 0) {
+ if (operation != KEY_OP_MATCH &&
+ operation != KEY_OP_NOMATCH) {
+ err("invalid DRIVER operation");
+ goto invalid;
+ }
add_rule_key(rule, &rule->driver, operation, value);
valid = 1;
continue;
}
if (strcasecmp(key, "OPTIONS") == 0) {
+ const char *pos;
+
if (strstr(value, "last_rule") != NULL) {
dbg("last rule to be applied");
rule->last_rule = 1;
dbg("remove event should be ignored");
rule->ignore_remove = 1;
}
+ pos = strstr(value, "link_priority=");
+ if (pos != NULL) {
+ rule->link_priority = atoi(&pos[strlen("link_priority=")]);
+ info("link priority=%i", rule->link_priority);
+ }
if (strstr(value, "all_partitions") != NULL) {
dbg("creation of partition nodes requested");
rule->partitions = DEFAULT_PARTITIONS_COUNT;