summaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
authorEric Andersen1999-11-18 00:19:26 +0000
committerEric Andersen1999-11-18 00:19:26 +0000
commitded6259f624c34f3bc221d1b2caee30fbcd729a4 (patch)
treecf1f7e4ffe1e24939dcfbc66d3bf0453081c5dc1 /init.c
parentd80e851dc05f978dded84b7ac9fcae7066e3ffe0 (diff)
downloadbusybox-ded6259f624c34f3bc221d1b2caee30fbcd729a4.zip
busybox-ded6259f624c34f3bc221d1b2caee30fbcd729a4.tar.gz
Latest and greatest0_36
Diffstat (limited to 'init.c')
-rw-r--r--init.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/init.c b/init.c
index a3e8d67..f6e9eff 100644
--- a/init.c
+++ b/init.c
@@ -41,7 +41,7 @@
#include <sys/vt.h> /* for vt_stat */
#include <sys/ioctl.h>
-#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 */