projects
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24ff31d
)
sd-device: keep escaped strings in DEVLINK= property
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Sun, 6 Dec 2020 12:10:34 +0000
(21:10 +0900)
committer
Michael Biebl
<biebl@debian.org>
Sat, 2 Jan 2021 16:06:01 +0000
(16:06 +0000)
This fixes a bug introduced by
87a4d416e5126b6fb2528ae192a6a6a8033539ce
.
Fixes #17772.
(cherry picked from commit
31063db0b4842a452c6eadde5b969aaee2a0516a
)
Gbp-Pq: Name sd-device-keep-escaped-strings-in-DEVLINK-property.patch
src/libsystemd/sd-device/device-private.c
patch
|
blob
|
history
diff --git
a/src/libsystemd/sd-device/device-private.c
b/src/libsystemd/sd-device/device-private.c
index 2801ebdcbe32080a929d574d562ac3b9d2777527..9070dfbdd1144f2dcf889aa415391667e2ae7a64 100644
(file)
--- a/
src/libsystemd/sd-device/device-private.c
+++ b/
src/libsystemd/sd-device/device-private.c
@@
-319,7
+319,10
@@
static int device_amend(sd_device *device, const char *key, const char *value) {
for (const char *p = value;;) {
_cleanup_free_ char *word = NULL;
- r = extract_first_word(&p, &word, NULL, 0);
+ /* udev rules may set escaped strings, and sd-device does not modify the input
+ * strings. So, it is also necessary to keep the strings received through
+ * sd-device-monitor. */
+ r = extract_first_word(&p, &word, NULL, EXTRACT_RETAIN_ESCAPE);
if (r < 0)
return r;
if (r == 0)