projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2ddedc
)
make sure that /linuxrc has std{in,out,err}
author
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 19 Jan 2013 18:29:54 +0000
(13:29 -0500)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 19 Jan 2013 18:29:54 +0000
(13:29 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
init/do_mounts_initrd.c
patch
|
blob
|
blame
|
history
diff --git
a/init/do_mounts_initrd.c
b/init/do_mounts_initrd.c
index 5e4ded51788eb81f277c0b5674f5602730220df4..f9acf71b98109434f09b396568caa4afc0ce3e16 100644
(file)
--- a/
init/do_mounts_initrd.c
+++ b/
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);