summaryrefslogtreecommitdiff
path: root/src/shared/switch-root.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-06 20:00:01 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-06 20:00:01 +0100
commit64e18fd626838c3500e28b4dbf86ed62206fff47 (patch)
treef5f05a69945ebbc3341472b894049c336cd575dd /src/shared/switch-root.c
parent2d58aa4692e9fc47911bff5d064ba3e328c35369 (diff)
switch-root: explain why we don't care about base_filesystem_create() failing
Diffstat (limited to 'src/shared/switch-root.c')
-rw-r--r--src/shared/switch-root.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/switch-root.c b/src/shared/switch-root.c
index 1a558b897b..3adb8463c5 100644
--- a/src/shared/switch-root.c
+++ b/src/shared/switch-root.c
@@ -102,6 +102,11 @@ int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot,
}
}
+ /* Do not fail, if base_filesystem_create() fails. 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 ignore the error and
+ * switch_root() nevertheless. */
(void) base_filesystem_create(new_root);
if (chdir(new_root) < 0) {