chiark / gitweb /
remove "last_rule" option
authorKay Sievers <kay.sievers@vrfy.org>
Wed, 28 Oct 2009 10:45:32 +0000 (11:45 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 28 Oct 2009 10:45:32 +0000 (11:45 +0100)
Its use breaks too many things which expect to be run from independent
later rules, and is an idication that something needs to be fixed
properly instead.

NEWS
udev/udev-rules.c
udev/udev.xml

diff --git a/NEWS b/NEWS
index 27b778f255028bb6b157acba973fadd8041f0cad..ec83316658892a7fadd4859f63cbf72d558b4c02 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,10 @@ the udevadm commands.
 The udev-acl tool got adopted to changes in ConsoleKit. Version 0.4.11 is
 required now.
 
+The option "last_rule" does no longer exist. Its use breaks too many
+things which expect to be run from independent later rules, and is an idication
+that something needs to be fixed properly instead.
+
 udev 146
 ========
 Bugfixes.
index ddb51de8e1dc6f243dbe4dc5530adb83265499d3..422e14ce234bfea9f8f792dfcc16bff5bdf6a30b 100644 (file)
@@ -164,7 +164,6 @@ enum token_type {
        TK_A_ATTR,                      /* val, attr */
        TK_A_RUN,                       /* val, bool */
        TK_A_GOTO,                      /* size_t */
-       TK_A_LAST_RULE,
 
        TK_END,
 };
@@ -296,7 +295,6 @@ static const char *token_str(enum token_type type)
                [TK_A_ATTR] =                   "A ATTR",
                [TK_A_RUN] =                    "A RUN",
                [TK_A_GOTO] =                   "A GOTO",
-               [TK_A_LAST_RULE] =              "A LAST_RULE",
 
                [TK_END] =                      "END",
        };
@@ -362,7 +360,6 @@ static void dump_token(struct udev_rules *rules, struct token *token)
        case TK_A_IGNORE_DEVICE:
        case TK_A_STRING_ESCAPE_NONE:
        case TK_A_STRING_ESCAPE_REPLACE:
-       case TK_A_LAST_RULE:
        case TK_A_IGNORE_REMOVE:
                dbg(rules->udev, "%s\n", token_str(type));
                break;
@@ -1037,7 +1034,6 @@ static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type,
        case TK_A_STRING_ESCAPE_NONE:
        case TK_A_STRING_ESCAPE_REPLACE:
        case TK_A_IGNORE_REMOVE:
-       case TK_A_LAST_RULE:
                break;
        case TK_A_RUN:
                token->key.value_off = add_string(rule_tmp->rules, value);
@@ -1500,10 +1496,6 @@ static int add_rule(struct udev_rules *rules, char *line,
                if (strcmp(key, "OPTIONS") == 0) {
                        const char *pos;
 
-                       if (strstr(value, "last_rule") != NULL) {
-                               dbg(rules->udev, "last rule to be applied\n");
-                               rule_add_key(&rule_tmp, TK_A_LAST_RULE, 0, NULL, NULL);
-                       }
                        if (strstr(value, "ignore_device") != NULL) {
                                dbg(rules->udev, "device should be ignored\n");
                                rule_add_key(&rule_tmp, TK_A_IGNORE_DEVICE, 0, NULL, NULL);
@@ -2526,7 +2518,6 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
                                break;
                        cur = &rules->tokens[cur->key.rule_goto];
                        continue;
-               case TK_A_LAST_RULE:
                case TK_END:
                        return 0;
 
index c34a106d208635f2ce24fc14582206456f04ffc2..41941c820f5e2ed326964e5a1b28da17adfa2fc9 100644 (file)
               <listitem>
                 <para>Rule and device options:</para>
                 <variablelist>
-                  <varlistentry>
-                    <term><option>last_rule</option></term>
-                    <listitem>
-                      <para>Stops further rules application. No later rules will have
-                      any effect.</para>
-                    </listitem>
-                  </varlistentry>
                   <varlistentry>
                     <term><option>ignore_device</option></term>
                     <listitem>