From: John Crispin Date: Sun, 15 May 2016 14:13:30 +0000 (+0200) Subject: Revert "mount_root: code failed in failsafe" X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1ff0c23ce4f0fadfb24557db5c7987e9841bd6d7;p=project%2Ffstools.git Revert "mount_root: code failed in failsafe" This reverts commit 09f8e0097fe1370700658542e7bda831c31de4bf. --- diff --git a/mount_root.c b/mount_root.c index d1b6981..bf70265 100644 --- a/mount_root.c +++ b/mount_root.c @@ -27,16 +27,14 @@ static int start(int argc, char *argv[1]) { - struct volume *root = volume_find("rootfs"); + struct volume *root; struct volume *data = volume_find("rootfs_data"); - if (data && find_mount_point(data->blk, 0)) - return -1; - - if (root && find_mount_point(root->blk, 0)) + if (!getenv("PREINIT")) return -1; if (!data) { + root = volume_find("rootfs"); volume_init(root); ULOG_NOTE("mounting /dev/root\n"); mount("/dev/root", "/", NULL, MS_NOATIME | MS_REMOUNT, 0);