Revert "mount_root: code failed in failsafe"
authorJohn Crispin <john@phrozen.org>
Sun, 15 May 2016 14:13:30 +0000 (16:13 +0200)
committerJohn Crispin <john@phrozen.org>
Sun, 15 May 2016 14:13:30 +0000 (16:13 +0200)
This reverts commit 09f8e0097fe1370700658542e7bda831c31de4bf.

mount_root.c

index d1b69814fcf0c9e569b4a1ea7fbdfe530f68bd2e..bf70265d45cc49568562e58ecfe6bd6cf41929be 100644 (file)
 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);