Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / init / do_mounts_initrd.c
index 07e7d31..405f903 100644 (file)
@@ -41,7 +41,7 @@ static int __init do_linuxrc(void * shell)
 static void __init handle_initrd(void)
 {
        int error;
-       int i, pid;
+       int pid;
 
        real_root_dev = new_encode_dev(ROOT_DEV);
        create_dev("/dev/root.old", Root_RAM0, NULL);
@@ -56,9 +56,10 @@ static void __init handle_initrd(void)
        sys_chroot(".");
        mount_devfs_fs ();
 
+       current->flags |= PF_NOFREEZE;
        pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
        if (pid > 0) {
-               while (pid != sys_wait4(-1, &i, 0, NULL))
+               while (pid != sys_wait4(-1, NULL, 0, NULL))
                        yield();
        }
 
@@ -86,7 +87,10 @@ static void __init handle_initrd(void)
                printk("okay\n");
        else {
                int fd = sys_open("/dev/root.old", O_RDWR, 0);
-               printk("failed\n");
+               if (error == -ENOENT)
+                       printk("/initrd does not exist. Ignored.\n");
+               else
+                       printk("failed\n");
                printk(KERN_NOTICE "Unmounting old root\n");
                sys_umount("/old", MNT_DETACH);
                printk(KERN_NOTICE "Trying to free ramdisk memory ... ");