+
+ if (strcasecmp(key, "OPTIONS") == 0) {
+ const char *pos;
+
+ if (strstr(value, "last_rule") != NULL) {
+ dbg("last rule to be applied");
+ rule->last_rule = 1;
+ }
+ if (strstr(value, "ignore_device") != NULL) {
+ dbg("device should be ignored");
+ rule->ignore_device = 1;
+ }
+ if (strstr(value, "ignore_remove") != NULL) {
+ 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=")]);
+ dbg("link priority=%i", rule->link_priority);
+ }
+ pos = strstr(value, "string_escape=");
+ if (pos != NULL) {
+ pos = &pos[strlen("string_escape=")];
+ if (strncmp(pos, "none", strlen("none")) == 0)
+ rule->string_escape = ESCAPE_NONE;
+ else if (strncmp(pos, "replace", strlen("replace")) == 0)
+ rule->string_escape = ESCAPE_REPLACE;
+ }
+ if (strstr(value, "all_partitions") != NULL) {
+ dbg("creation of partition nodes requested");
+ rule->partitions = DEFAULT_PARTITIONS_COUNT;
+ }
+ valid = 1;
+ continue;
+ }
+
+ err("unknown key '%s' in %s:%u", key, filename, lineno);