summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-07-16 16:04:35 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-07-16 18:38:03 +0200
commitba60127df7bcc8263ae94092aca972b9f11c70ec (patch)
treedb22d33f7273a583b7ef9c015a6450be81c35e87
parentudev: accept IMPORT{}= without any fuss (diff)
downloadsystemd-ba60127df7bcc8263ae94092aca972b9f11c70ec.tar.xz
systemd-ba60127df7bcc8263ae94092aca972b9f11c70ec.zip
udev: accept OPTIONS+= without any fuss
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.
-rw-r--r--src/udev/udev-rules.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index c9c01fcc59..2a1cc21166 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -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);