aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init/init.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/init/init.c b/init/init.c
index 6eb76b80e..0813d1b5f 100644
--- a/init/init.c
+++ b/init/init.c
@@ -297,6 +297,11 @@ static void console_init(void)
297 s = getenv("CONSOLE"); 297 s = getenv("CONSOLE");
298 if (!s) 298 if (!s)
299 s = getenv("console"); 299 s = getenv("console");
300#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
301 /* BSD people say their kernels do not open fd 0,1,2; they need this: */
302 if (!s)
303 s = (char*)"/dev/console";
304#endif
300 if (s) { 305 if (s) {
301 int fd = open(s, O_RDWR | O_NONBLOCK | O_NOCTTY); 306 int fd = open(s, O_RDWR | O_NONBLOCK | O_NOCTTY);
302 if (fd >= 0) { 307 if (fd >= 0) {