switch-root: fix error message

Fixes #11261.
This commit is contained in:
Yu Watanabe 2018-12-25 13:10:18 +09:00
parent 7334ade4a7
commit a5c67ccc57
1 changed files with 1 additions and 1 deletions

View 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