From b6b71329be322a915f1e99d7bf656c7c38d6b13f Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 19 Jan 2013 13:29:54 -0500 Subject: [PATCH] --- yaml --- r: 348924 b: refs/heads/master c: 43b16820249396aea7eb57c747106e211e54bed5 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/init/do_mounts_initrd.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2b3b348a2e4b..4d7b74d051a1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b2ddedcd21f44a5873ee3d6ff6118a2318e01e18 +refs/heads/master: 43b16820249396aea7eb57c747106e211e54bed5 diff --git a/trunk/init/do_mounts_initrd.c b/trunk/init/do_mounts_initrd.c index 5e4ded51788e..f9acf71b9810 100644 --- a/trunk/init/do_mounts_initrd.c +++ b/trunk/init/do_mounts_initrd.c @@ -36,6 +36,10 @@ __setup("noinitrd", no_initrd); static int init_linuxrc(struct subprocess_info *info, struct cred *new) { sys_unshare(CLONE_FS | CLONE_FILES); + /* stdin/stdout/stderr for /linuxrc */ + sys_open("/dev/console", O_RDWR, 0); + sys_dup(0); + sys_dup(0); /* move initrd over / and chdir/chroot in initrd root */ sys_chdir("/root"); sys_mount(".", "/", NULL, MS_MOVE, NULL);