From: Yu Watanabe Date: Tue, 25 Dec 2018 04:10:18 +0000 (+0900) Subject: switch-root: fix error message X-Git-Tag: archive/raspbian/240-4+rpi1^2~56 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9cfddb18d73db36a9a9e23419ce6cf2174f28fdf;p=systemd.git switch-root: fix error message Fixes #11261. (cherry picked from commit a5c67ccc575e6ebf12710cb7df84f65a51c5dc58) (cherry picked from commit ebcd154e1df434865d2752efdccbc7737bb28029) Gbp-Pq: Name switch-root-fix-error-message.patch --- diff --git a/src/shared/switch-root.c b/src/shared/switch-root.c index ee31c448..dbb46223 100644 --- a/src/shared/switch-root.c +++ b/src/shared/switch-root.c @@ -83,7 +83,7 @@ int switch_root(const char *new_root, (void) mkdir_p_label(chased, 0755); if (mount(i, chased, NULL, mount_flags, NULL) < 0) - return log_error_errno(r, "Failed to mount %s to %s: %m", i, chased); + return log_error_errno(errno, "Failed to mount %s to %s: %m", i, chased); } /* Do not fail if base_filesystem_create() fails. Not all switch roots are like base_filesystem_create() wants