summaryrefslogtreecommitdiff
path: root/src/udev/udev-event.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-03-05 11:31:30 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-03-05 11:31:30 +0900
commitdaceb818cfafbeac470aa5efc5e36e64e52d906d (patch)
tree2472b752215a69017b943799d68bea0dc946a707 /src/udev/udev-event.c
parent86c783d93dafde1d175170b6366725ebfd148de6 (diff)
downloadsystemd-daceb818cfafbeac470aa5efc5e36e64e52d906d.tar.gz
udev: also not unescape command result on debug log
Diffstat (limited to 'src/udev/udev-event.c')
-rw-r--r--src/udev/udev-event.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 78a999d00a..d5d89d6802 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -573,9 +573,11 @@ static int on_spawn_io(sd_event_source *s, int fd, uint32_t revents, void *userd
_cleanup_strv_free_ char **v = NULL;
char **q;
- v = strv_split_newlines(p);
- if (!v)
- log_oom_debug();
+ r = strv_split_newlines_full(&v, p, EXTRACT_RETAIN_ESCAPE);
+ if (r < 0)
+ log_device_debug(spawn->device,
+ "Failed to split output from '%s'(%s), ignoring: %m",
+ spawn->cmd, fd == spawn->fd_stdout ? "out" : "err");
STRV_FOREACH(q, v)
log_device_debug(spawn->device, "'%s'(%s) '%s'", spawn->cmd,