summaryrefslogtreecommitdiff
path: root/udev_rules_parse.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-03-16 15:16:08 +0100
committerKay Sievers <kay.sievers@vrfy.org>2007-03-16 15:16:08 +0100
commit2dbb47f8606d18b14e981fb5cf245e8aaaad2de1 (patch)
tree7935d01e23f4f5b7305292a98685f491d75549ab /udev_rules_parse.c
parentfc6da921ad3bcb251aa317376e81701700e925c9 (diff)
add link_priority to rule options, and store it in database
Diffstat (limited to 'udev_rules_parse.c')
-rw-r--r--udev_rules_parse.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/udev_rules_parse.c b/udev_rules_parse.c
index 5ce91df383..bfbad367e9 100644
--- a/udev_rules_parse.c
+++ b/udev_rules_parse.c
@@ -555,6 +555,8 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena
}
if (strcasecmp(key, "OPTIONS") == 0) {
+ const char *pos;
+
if (strstr(value, "last_rule") != NULL) {
dbg("last rule to be applied");
rule->last_rule = 1;
@@ -567,6 +569,11 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena
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;