]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Allow booting from USB drive
authorTony Lindgren <tony@atomide.com>
Mon, 9 May 2005 21:17:42 +0000 (14:17 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 9 May 2005 21:17:42 +0000 (14:17 -0700)
Allows booting from USB drive.

Signed-off-by: Tony Lindgren <tony@atomide.com>
init/do_mounts.c

index b7570c074d0fe7929258bbc4d43d7cb52206087e..beac71b0909a6c31af71a52047800dee949a6bd2 100644 (file)
@@ -287,6 +287,7 @@ void __init mount_block_root(char *name, int flags)
        char *fs_names = __getname();
        char *p;
        char b[BDEVNAME_SIZE];
+       int i = 0;
 
        get_fs_names(fs_names);
 retry:
@@ -301,6 +302,14 @@ retry:
                        case -EINVAL:
                                continue;
                }
+
+               printk("VFS: No root yet, retrying to mount root on %s (%s)\n",
+                      root_device_name, __bdevname(ROOT_DEV, b));
+               current->state = TASK_INTERRUPTIBLE;
+               schedule_timeout(10 * HZ);
+               if (i++ < 5)
+                       goto retry;
+
                /*
                 * Allow the user to distinguish between failed sys_open
                 * and bad superblock on root device.