projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cf9fa6
)
init: fix for FreeBSD console opening. Closes 9031
author
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 22 Aug 2016 18:56:58 +0000
(20:56 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 22 Aug 2016 18:56:58 +0000
(20:56 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
init/init.c
patch
|
blob
|
history
diff --git
a/init/init.c
b/init/init.c
index 6eb76b80e42c7243fa5674addbb321c58523f881..0813d1b5f0fa3177c5827a004ff4546594bb713f 100644
(file)
--- a/
init/init.c
+++ b/
init/init.c
@@
-297,6
+297,11
@@
static void console_init(void)
s = getenv("CONSOLE");
if (!s)
s = getenv("console");
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ /* BSD people say their kernels do not open fd 0,1,2; they need this: */
+ if (!s)
+ s = (char*)"/dev/console";
+#endif
if (s) {
int fd = open(s, O_RDWR | O_NONBLOCK | O_NOCTTY);
if (fd >= 0) {