]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - init/do_mounts_initrd.c
init: add an init_chroot helper
[thirdparty/linux.git] / init / do_mounts_initrd.c
index 04627fd22a921fac08854c30b1fa0cf53a171648..a6b447b191dbc8debb68f86ce2e1ad51c4117bc8 100644 (file)
@@ -63,7 +63,7 @@ static int __init init_linuxrc(struct subprocess_info *info, struct cred *new)
        /* move initrd over / and chdir/chroot in initrd root */
        init_chdir("/root");
        init_mount(".", "/", NULL, MS_MOVE, NULL);
-       ksys_chroot(".");
+       init_chroot(".");
        ksys_setsid();
        return 0;
 }
@@ -101,7 +101,7 @@ static void __init handle_initrd(void)
        /* move initrd to rootfs' /old */
        init_mount("..", ".", NULL, MS_MOVE, NULL);
        /* switch root and cwd back to / of rootfs */
-       ksys_chroot("..");
+       init_chroot("..");
 
        if (new_decode_dev(real_root_dev) == Root_RAM0) {
                init_chdir("/old");