]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
switch-root: fix error message
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 25 Dec 2018 04:10:18 +0000 (13:10 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 Dec 2018 06:37:15 +0000 (15:37 +0900)
Fixes #11261.

src/shared/switch-root.c

index ee31c448fc80b3fee8548254e09b0927a684b870..dbb4622312a079080ab3ae63720ce1cce4517abc 100644 (file)
@@ -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