diff options
| author | Eric Andersen <andersen@codepoet.org> | 1999-11-18 00:19:26 +0000 |
|---|---|---|
| committer | Eric Andersen <andersen@codepoet.org> | 1999-11-18 00:19:26 +0000 |
| commit | ded6259f624c34f3bc221d1b2caee30fbcd729a4 (patch) | |
| tree | cf1f7e4ffe1e24939dcfbc66d3bf0453081c5dc1 /init | |
| parent | d80e851dc05f978dded84b7ac9fcae7066e3ffe0 (diff) | |
| download | busybox-w32-ded6259f624c34f3bc221d1b2caee30fbcd729a4.tar.gz busybox-w32-ded6259f624c34f3bc221d1b2caee30fbcd729a4.tar.bz2 busybox-w32-ded6259f624c34f3bc221d1b2caee30fbcd729a4.zip | |
Latest and greatest0_36
Diffstat (limited to 'init')
| -rw-r--r-- | init/init.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/init/init.c b/init/init.c index a3e8d6700..f6e9eff97 100644 --- a/init/init.c +++ b/init/init.c | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | #include <sys/vt.h> /* for vt_stat */ | 41 | #include <sys/vt.h> /* for vt_stat */ |
| 42 | #include <sys/ioctl.h> | 42 | #include <sys/ioctl.h> |
| 43 | 43 | ||
| 44 | #define VT_CONSOLE "/dev/console" /* Logical system console */ | 44 | #define DEV_CONSOLE "/dev/console" /* Logical system console */ |
| 45 | #define VT_PRIMARY "/dev/tty1" /* Primary virtual console */ | 45 | #define VT_PRIMARY "/dev/tty1" /* Primary virtual console */ |
| 46 | #define VT_SECONDARY "/dev/tty2" /* Virtual console */ | 46 | #define VT_SECONDARY "/dev/tty2" /* Virtual console */ |
| 47 | #define VT_LOG "/dev/tty3" /* Virtual console */ | 47 | #define VT_LOG "/dev/tty3" /* Virtual console */ |
| @@ -53,7 +53,7 @@ | |||
| 53 | 53 | ||
| 54 | #define LOG 0x1 | 54 | #define LOG 0x1 |
| 55 | #define CONSOLE 0x2 | 55 | #define CONSOLE 0x2 |
| 56 | static char *console = VT_CONSOLE; | 56 | static char *console = DEV_CONSOLE; |
| 57 | static char *second_console = VT_SECONDARY; | 57 | static char *second_console = VT_SECONDARY; |
| 58 | static char *log = VT_LOG; | 58 | static char *log = VT_LOG; |
| 59 | static int kernel_version = 0; | 59 | static int kernel_version = 0; |
| @@ -109,7 +109,8 @@ void message(int device, char *fmt, ...) | |||
| 109 | va_end(arguments); | 109 | va_end(arguments); |
| 110 | } | 110 | } |
| 111 | if (device & CONSOLE) { | 111 | if (device & CONSOLE) { |
| 112 | if ((fd = device_open(console, O_WRONLY|O_NOCTTY|O_NDELAY)) >= 0) { | 112 | /* Always send console messages to /dev/console so people will see them. */ |
| 113 | if ((fd = device_open(DEV_CONSOLE, O_WRONLY|O_NOCTTY|O_NDELAY)) >= 0) { | ||
| 113 | va_start(arguments, fmt); | 114 | va_start(arguments, fmt); |
| 114 | vdprintf(fd, fmt, arguments); | 115 | vdprintf(fd, fmt, arguments); |
| 115 | va_end(arguments); | 116 | va_end(arguments); |
| @@ -217,7 +218,7 @@ static void console_init() | |||
| 217 | /* this is linux virtual tty */ | 218 | /* this is linux virtual tty */ |
| 218 | snprintf( the_console, sizeof the_console, "/dev/tty%d", vt.v_active ); | 219 | snprintf( the_console, sizeof the_console, "/dev/tty%d", vt.v_active ); |
| 219 | } else { | 220 | } else { |
| 220 | console = VT_CONSOLE; | 221 | console = DEV_CONSOLE; |
| 221 | tried_devcons++; | 222 | tried_devcons++; |
| 222 | } | 223 | } |
| 223 | } | 224 | } |
| @@ -226,7 +227,7 @@ static void console_init() | |||
| 226 | /* Can't open selected console -- try /dev/console */ | 227 | /* Can't open selected console -- try /dev/console */ |
| 227 | if (!tried_devcons) { | 228 | if (!tried_devcons) { |
| 228 | tried_devcons++; | 229 | tried_devcons++; |
| 229 | console = VT_CONSOLE; | 230 | console = DEV_CONSOLE; |
| 230 | continue; | 231 | continue; |
| 231 | } | 232 | } |
| 232 | /* Can't open selected console -- try vt1 */ | 233 | /* Can't open selected console -- try vt1 */ |
