]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: accept OPTIONS+= without any fuss
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 16 Jul 2020 14:04:35 +0000 (16:04 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 16 Jul 2020 16:38:03 +0000 (18:38 +0200)
There is no reason to consider this wrong. In fact one could argue that +=
is more appropriate, because we always add to options, and not replace previous
assignments. If we output a debug message, we implicitly ask people to "fix" this,
and we shouldn't.

Also, all our rules use += right now.

src/udev/udev-rules.c

index c9c01fcc599ffba5fdccbb5df3a39b2d403d6baf..2a1cc21166926b61ccd1a067b2df5c83008384f9 100644 (file)
@@ -809,10 +809,8 @@ static int parse_token(UdevRules *rules, const char *key, char *attr, UdevRuleOp
                         return log_token_invalid_attr(rules, key);
                 if (is_match || op == OP_REMOVE)
                         return log_token_invalid_op(rules, key);
-                if (op == OP_ADD) {
-                        log_token_debug(rules, "Operator '+=' is specified to %s key, assuming '='.", key);
+                if (op == OP_ADD)
                         op = OP_ASSIGN;
-                }
 
                 if (streq(value, "string_escape=none"))
                         r = rule_line_add_token(rule_line, TK_A_OPTIONS_STRING_ESCAPE_NONE, op, NULL, NULL);