Merge pull request #799 from Kwiboo/aarch64-dev-console

linux: remove /dev/console patch from aarch64
This commit is contained in:
Lukas Rusak 2016-10-03 14:21:08 -07:00 committed by GitHub
commit 438740d2e1

View File

@ -1,21 +0,0 @@
diff --git a/init/main.c b/init/main.c
index 9484f4b..db55edd 100644
--- a/init/main.c
+++ b/init/main.c
@@ -880,8 +880,14 @@ static noinline void __init kernel_init_freeable(void)
do_basic_setup();
/* Open the /dev/console on the rootfs, this should never fail */
- if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
- pr_err("Warning: unable to open an initial console.\n");
+ char *console = "/dev_console";
+
+ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) {
+ sys_mknod(console, S_IFCHR|0600, (TTYAUX_MAJOR<<8)|1);
+ if (sys_open(console, O_RDWR, 0) < 0)
+ printk(KERN_WARNING "Warning: unable to open an initial console.\n");
+ sys_unlink(console);
+ }
(void) sys_dup(0);
(void) sys_dup(0);