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.
base_filesystem_create() should have logged, what went wrong.
struct stat new_root_stat;
bool old_root_remove;
const char *i, *temporary_old_root;
- int r;
if (path_equal(new_root, "/"))
return 0;
}
}
- r = base_filesystem_create(new_root);
- if (r < 0) {
- log_error("Failed to create the base filesystem: %s", strerror(-r));
- return r;
- }
+ (void) base_filesystem_create(new_root);
if (chdir(new_root) < 0) {
log_error("Failed to change directory to %s: %m", new_root);