chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add link_priority to rule options, and store it in database
[elogind.git]
/
udev_rules_parse.c
diff --git
a/udev_rules_parse.c
b/udev_rules_parse.c
index 5ce91df383dfdb5c924b7008549b6d7b8679d70c..bfbad367e9d41e4dfda8f806e5b737c08099bb3c 100644
(file)
--- 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) {
}
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, "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;
}
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;
if (strstr(value, "all_partitions") != NULL) {
dbg("creation of partition nodes requested");
rule->partitions = DEFAULT_PARTITIONS_COUNT;