]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shutdown: propagate the original errno
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 10 Jan 2023 09:20:04 +0000 (18:20 +0900)
committerLennart Poettering <lennart@poettering.net>
Tue, 10 Jan 2023 11:06:49 +0000 (12:06 +0100)
Follow-up for b293bb23162534e0260ed07357c2478655541166.

src/shutdown/umount.c

index 13a80b8e7f069e30cbe44c56fdf310eb188dd789..dc662a5812fa83319d3d6987c0c1f4174d2a0422 100644 (file)
@@ -638,7 +638,7 @@ static int remount_with_timeout(MountPoint *m, bool last_try) {
                 if (read(pfd[0], &r, sizeof(r)) == sizeof(r))
                         log_debug_errno(r, "Remounting '%s' failed abnormally, child process " PID_FMT " failed: %m", m->path, pid);
                 else
-                        log_debug_errno(r, "Remounting '%s' failed abnormally, child process " PID_FMT " aborted or exited non-zero.", m->path, pid);
+                        r = log_debug_errno(EPROTO, "Remounting '%s' failed abnormally, child process " PID_FMT " aborted or exited non-zero.", m->path, pid);
                 TAKE_PID(pid); /* child exited (just not as we expected) hence don't kill anymore */
         } else if (r < 0)
                 log_error_errno(r, "Remounting '%s' failed unexpectedly, couldn't wait for child process " PID_FMT ": %m", m->path, pid);