From: Denis Vlasenko Date: Sun, 18 Nov 2007 05:43:05 +0000 (-0000) Subject: syslogd: use DEV_CONSOLE consistently X-Git-Tag: 1_9_0~92 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=70ab28f90776de54cd136a411b2914b1b88cc3de;p=oweals%2Fbusybox.git syslogd: use DEV_CONSOLE consistently init: remove obsolete comment --- diff --git a/init/init.c b/init/init.c index 9891087f5..fe0ec030a 100644 --- a/init/init.c +++ b/init/init.c @@ -11,9 +11,6 @@ #include "libbb.h" #include -//#include -//#include -//#include #include #if ENABLE_FEATURE_INIT_SYSLOG @@ -977,7 +974,6 @@ int init_main(int argc, char **argv) BB_EXECVP(argv[0], argv); } else if (enforce > 0) { /* SELinux in enforcing mode but load_policy failed */ - /* At this point, we probably can't open /dev/console, so log() won't work */ message(L_CONSOLE, "Cannot load SELinux Policy. " "Machine is in enforcing mode. Halting now."); exit(1); diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index e3abcc7cb..5998732bd 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -299,7 +299,7 @@ static void log_locally(char *msg) | O_NOCTTY | O_APPEND | O_NONBLOCK); if (G.logFD < 0) { /* cannot open logfile? - print to /dev/console then */ - int fd = device_open(_PATH_CONSOLE, O_WRONLY | O_NOCTTY | O_NONBLOCK); + int fd = device_open(DEV_CONSOLE, O_WRONLY | O_NOCTTY | O_NONBLOCK); if (fd < 0) fd = 2; /* then stderr, dammit */ full_write(fd, msg, len);