[systemd-devel] [PATCH] switch_root: do not fail, if base_filesystem_create() failed
harald at redhat.com
harald at redhat.com
Wed Sep 3 04:34:35 PDT 2014
From: Harald Hoyer <harald at redhat.com>
Not all switch roots are like base_filesystem_create() wants them
to look like. They might even boot, if they are RO and don't have the FS
layout. Just output the error and switch_root nevertheless.
---
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 5f075e6..fcd3420 100644
--- a/src/shared/switch-root.c
+++ b/src/shared/switch-root.c
@@ -107,7 +107,7 @@ int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot,
r = base_filesystem_create(new_root);
if (r < 0) {
log_error("Failed to create the base filesystem: %s", strerror(-r));
- return r;
+ r = 0;
}
if (chdir(new_root) < 0) {
--
2.1.0
More information about the systemd-devel
mailing list