|
real_root_dev = new_encode_dev(ROOT_DEV);
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);
root_fd = sys_open("/",0);
old_fd = sys_open("/old",0);
/* move initrd over / and chdir/chroot in initrd root */
sys_chdir("/root");
sys_mount(".",NULL);
sys_chroot(".");
/*
* In case that a resume from disk is carried out by linuxrc or one of
* its children,we need to tell the freezer not to wait for us.
*/
current->flags |= PF_FREEZER_SKIP;
pid = kernel_thread(do_linuxrc,"/linuxrc",SIGCHLD);
if (pid > 0)
while (pid != sys_wait4(-1,NULL))
yield();
current->flags &= ~PF_FREEZER_SKIP;
(编辑:网站开发网_安阳站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|