Showing the changes to init (1 of 1 file). Show all
Unified · Split
| @@ -36,6 +36,10 @@ __setup("noinitrd", no_initrd); · 35 unmodified lines | ||
| 36 | 36 | static int init_linuxrc(struct subprocess_info *info, struct cred *new) |
| 37 | 37 | { |
| 38 | 38 | sys_unshare(CLONE_FS | CLONE_FILES); |
| 39 | + /* stdin/stdout/stderr for /linuxrc */ | |
| 40 | + sys_open("/dev/console", O_RDWR, 0); | |
| 41 | + sys_dup(0); | |
| 42 | + sys_dup(0); | |
| 39 | 43 | /* move initrd over / and chdir/chroot in initrd root */ |
| 40 | 44 | sys_chdir("/root"); |
| 41 | 45 | sys_mount(".", "/", NULL, MS_MOVE, NULL); |