X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev_rules_parse.c;h=bdaf55bd4851a21b82890067da8c422dbf5ff175;hb=ad1be3e7ad01b263312eaf2a06db0c24c9c90441;hp=b586df13241270ebafbb6e7f301410efc71afe3b;hpb=c70560feef0eb61a150cd2f956f0beead4313ffe;p=elogind.git diff --git a/udev_rules_parse.c b/udev_rules_parse.c index b586df132..bdaf55bd4 100644 --- a/udev_rules_parse.c +++ b/udev_rules_parse.c @@ -245,6 +245,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena memset(buf, 0x00, sizeof(buf)); rule = (struct udev_rule *) buf; + rule->event_timeout = -1; linepos = line; valid = 0; @@ -494,8 +495,8 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena continue; } - if (strcasecmp(key, "WAIT_FOR_SYSFS") == 0) { - add_rule_key(rule, &rule->wait_for_sysfs, operation, value); + if (strcasecmp(key, "WAIT_FOR") == 0 || strcasecmp(key, "WAIT_FOR_SYSFS") == 0) { + add_rule_key(rule, &rule->wait_for, operation, value); valid = 1; continue; } @@ -604,6 +605,11 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena rule->link_priority = atoi(&pos[strlen("link_priority=")]); dbg("link priority=%i\n", rule->link_priority); } + pos = strstr(value, "event_timeout="); + if (pos != NULL) { + rule->event_timeout = atoi(&pos[strlen("event_timeout=")]); + dbg("event timout=%i\n", rule->event_timeout); + } pos = strstr(value, "string_escape="); if (pos != NULL) { pos = &pos[strlen("string_escape=")]; @@ -623,7 +629,7 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena err("unknown key '%s' in %s:%u\n", key, filename, lineno); } - if (physdev && rule->wait_for_sysfs.operation == KEY_OP_UNSET) + if (physdev && rule->wait_for.operation == KEY_OP_UNSET) err("PHYSDEV* values are deprecated and will be removed from a future kernel, \n" "please fix it in %s:%u", filename, lineno);