]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: also not unescape command result on debug log
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 5 Mar 2021 02:31:30 +0000 (11:31 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 5 Mar 2021 02:31:30 +0000 (11:31 +0900)
src/udev/udev-event.c

index 78a999d00a1ed316b1f809aa5e16cb9525270f4a..d5d89d6802f75b10911aa897e63b3b1c034cd07f 100644 (file)
@@ -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,