1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 03:25:31 +03:00

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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-07-16 16:04:35 +02:00
parent b6a80b83bc
commit ba60127df7

View 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);