aboutsummaryrefslogtreecommitdiffstats
path: root/init/do_mounts.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/do_mounts.c')
-rw-r--r--init/do_mounts.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 46fe407fb03e..4efa1e5385e3 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -25,6 +25,7 @@ int __initdata rd_doload; /* 1 = load RAM disk, 0 = don't load */
25int root_mountflags = MS_RDONLY | MS_SILENT; 25int root_mountflags = MS_RDONLY | MS_SILENT;
26char * __initdata root_device_name; 26char * __initdata root_device_name;
27static char __initdata saved_root_name[64]; 27static char __initdata saved_root_name[64];
28static int __initdata root_wait;
28 29
29dev_t ROOT_DEV; 30dev_t ROOT_DEV;
30 31
@@ -216,6 +217,16 @@ static int __init root_dev_setup(char *line)
216 217
217__setup("root=", root_dev_setup); 218__setup("root=", root_dev_setup);
218 219
220static int __init rootwait_setup(char *str)
221{
222 if (*str)
223 return 0;
224 root_wait = 1;
225 return 1;
226}
227
228__setup("rootwait", rootwait_setup);
229
219static char * __initdata root_mount_data; 230static char * __initdata root_mount_data;
220static int __init root_data_setup(char *str) 231static int __init root_data_setup(char *str)
221{ 232{
@@ -438,11 +449,20 @@ void __init prepare_namespace(void)
438 root_device_name += 5; 449 root_device_name += 5;
439 } 450 }
440 451
441 is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
442
443 if (initrd_load()) 452 if (initrd_load())
444 goto out; 453 goto out;
445 454
455 /* wait for any asynchronous scanning to complete */
456 if ((ROOT_DEV == 0) && root_wait) {
457 printk(KERN_INFO "Waiting for root device %s...\n",
458 saved_root_name);
459 while (driver_probe_done() != 0 ||
460 (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0)
461 msleep(100);
462 }
463
464 is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
465
446 if (is_floppy && rd_doload && rd_load_disk(0)) 466 if (is_floppy && rd_doload && rd_load_disk(0))
447 ROOT_DEV = Root_RAM0; 467 ROOT_DEV = Root_RAM0;
448 468