X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=init%2Fdo_mounts_initrd.c;h=919a80cb322e6f57dfa2be0a3bb727251bcd7e0e;hb=dcf234f3b0cbc4d2b73f5ee02405b117c5d77fbd;hp=a05cabd0fd10420a20c6192b989cb8dd23629346;hpb=c0d6f9663b30a09ed725229b2d50391268c8538e;p=linux-2.6 diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index a05cabd0fd..919a80cb32 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -1,4 +1,3 @@ -#define __KERNEL_SYSCALLS__ #include #include #include @@ -35,7 +34,7 @@ static int __init do_linuxrc(void * shell) (void) sys_open("/dev/console",O_RDWR,0); (void) sys_dup(0); (void) sys_dup(0); - return execve(shell, argv, envp_init); + return kernel_execve(shell, argv, envp_init); } static void __init handle_initrd(void) @@ -44,7 +43,7 @@ static void __init handle_initrd(void) int pid; real_root_dev = new_encode_dev(ROOT_DEV); - create_dev("/dev/root.old", Root_RAM0, NULL); + create_dev("/dev/root.old", Root_RAM0); /* mount initrd on rootfs' /root */ mount_block_root("/dev/root.old", root_mountflags & ~MS_RDONLY); sys_mkdir("/old", 0700); @@ -54,8 +53,8 @@ static void __init handle_initrd(void) sys_chdir("/root"); sys_mount(".", "/", NULL, MS_MOVE, NULL); sys_chroot("."); - mount_devfs_fs (); + current->flags |= PF_NOFREEZE; pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD); if (pid > 0) { while (pid != sys_wait4(-1, NULL, 0, NULL)) @@ -70,7 +69,6 @@ static void __init handle_initrd(void) sys_chroot("."); sys_close(old_fd); sys_close(root_fd); - umount_devfs("/old/dev"); if (new_decode_dev(real_root_dev) == Root_RAM0) { sys_chdir("/old"); @@ -106,7 +104,7 @@ static void __init handle_initrd(void) int __init initrd_load(void) { if (mount_initrd) { - create_dev("/dev/ram", Root_RAM0, NULL); + create_dev("/dev/ram", Root_RAM0); /* * Load the initrd data into /dev/ram0. Execute it as initrd * unless /dev/ram0 is supposed to be our actual root device,