From 3398e07ac790c11b529c47e49f6af52d57402c66 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 25 Dec 2018 13:10:18 +0900 Subject: [PATCH] switch-root: fix error message Fixes #11261. --- src/shared/switch-root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/switch-root.c b/src/shared/switch-root.c index ee31c448fc80b..dbb4622312a07 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