mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 09:21:26 +03:00
udev-rules: perform whitespace replacement for symlink subst values
If the string_escape option is either unset or 'replace' (i.e. if it is not 'none'), then enable whitespace replacement in SYMLINK variable substitution values, as added in the last patch. This will keep any whitespace that is directly contained in a SYMLINK value, but will replace any whitespace that is added to the SYMLINK value as a result of variable substitution (except $result/%c). This fixes bug 4833.
This commit is contained in:
parent
e20a917105
commit
0a10235ed4
@ -2336,7 +2336,7 @@ void udev_rules_apply_to_event(struct udev_rules *rules,
|
||||
udev_device_cleanup_devlinks_list(event->dev);
|
||||
|
||||
/* allow multiple symlinks separated by spaces */
|
||||
udev_event_apply_format(event, rules_str(rules, cur->key.value_off), temp, sizeof(temp), false);
|
||||
udev_event_apply_format(event, rules_str(rules, cur->key.value_off), temp, sizeof(temp), esc != ESCAPE_NONE);
|
||||
if (esc == ESCAPE_UNSET)
|
||||
count = util_replace_chars(temp, "/ ");
|
||||
else if (esc == ESCAPE_REPLACE)
|
||||
|
Loading…
Reference in New Issue
Block a user