From ded6259f624c34f3bc221d1b2caee30fbcd729a4 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 18 Nov 1999 00:19:26 +0000 Subject: Latest and greatest --- init.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'init.c') diff --git a/init.c b/init.c index a3e8d6700..f6e9eff97 100644 --- a/init.c +++ b/init.c @@ -41,7 +41,7 @@ #include /* for vt_stat */ #include -#define VT_CONSOLE "/dev/console" /* Logical system console */ +#define DEV_CONSOLE "/dev/console" /* Logical system console */ #define VT_PRIMARY "/dev/tty1" /* Primary virtual console */ #define VT_SECONDARY "/dev/tty2" /* Virtual console */ #define VT_LOG "/dev/tty3" /* Virtual console */ @@ -53,7 +53,7 @@ #define LOG 0x1 #define CONSOLE 0x2 -static char *console = VT_CONSOLE; +static char *console = DEV_CONSOLE; static char *second_console = VT_SECONDARY; static char *log = VT_LOG; static int kernel_version = 0; @@ -109,7 +109,8 @@ void message(int device, char *fmt, ...) va_end(arguments); } if (device & CONSOLE) { - if ((fd = device_open(console, O_WRONLY|O_NOCTTY|O_NDELAY)) >= 0) { + /* Always send console messages to /dev/console so people will see them. */ + if ((fd = device_open(DEV_CONSOLE, O_WRONLY|O_NOCTTY|O_NDELAY)) >= 0) { va_start(arguments, fmt); vdprintf(fd, fmt, arguments); va_end(arguments); @@ -217,7 +218,7 @@ static void console_init() /* this is linux virtual tty */ snprintf( the_console, sizeof the_console, "/dev/tty%d", vt.v_active ); } else { - console = VT_CONSOLE; + console = DEV_CONSOLE; tried_devcons++; } } @@ -226,7 +227,7 @@ static void console_init() /* Can't open selected console -- try /dev/console */ if (!tried_devcons) { tried_devcons++; - console = VT_CONSOLE; + console = DEV_CONSOLE; continue; } /* Can't open selected console -- try vt1 */ -- cgit v1.2.3