summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorDan Streetman <ddstreet@ieee.org>2017-01-03 14:39:50 -0500
committerDan Streetman <ddstreet@ieee.org>2017-01-03 17:24:52 -0500
commit0a10235ed4538a80f5fc7dbbf79e3a1c178f5179 (patch)
treeef8361a9cf6b50b59ffbfa474eef4390964e43ae /src/udev
parente20a917105b9c41e7e552ca5f11f9077897db505 (diff)
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.
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udev-rules.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index c688120552..4d07b8fce0 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -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)