From 64e18fd626838c3500e28b4dbf86ed62206fff47 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 6 Nov 2014 20:00:01 +0100 Subject: switch-root: explain why we don't care about base_filesystem_create() failing --- src/shared/switch-root.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/shared/switch-root.c') 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) { -- cgit v1.2.3-54-g00ecf