syslogd: use DEV_CONSOLE consistently

init: remove obsolete comment
This commit is contained in:
Denis Vlasenko 2007-11-18 05:43:05 +00:00
parent fbe5f39f0f
commit 70ab28f907
2 changed files with 1 additions and 5 deletions

View File

@ -11,9 +11,6 @@
#include "libbb.h" #include "libbb.h"
#include <paths.h> #include <paths.h>
//#include <signal.h>
//#include <sys/ioctl.h>
//#include <sys/wait.h>
#include <sys/reboot.h> #include <sys/reboot.h>
#if ENABLE_FEATURE_INIT_SYSLOG #if ENABLE_FEATURE_INIT_SYSLOG
@ -977,7 +974,6 @@ int init_main(int argc, char **argv)
BB_EXECVP(argv[0], argv); BB_EXECVP(argv[0], argv);
} else if (enforce > 0) { } else if (enforce > 0) {
/* SELinux in enforcing mode but load_policy failed */ /* 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. " message(L_CONSOLE, "Cannot load SELinux Policy. "
"Machine is in enforcing mode. Halting now."); "Machine is in enforcing mode. Halting now.");
exit(1); exit(1);

View File

@ -299,7 +299,7 @@ static void log_locally(char *msg)
| O_NOCTTY | O_APPEND | O_NONBLOCK); | O_NOCTTY | O_APPEND | O_NONBLOCK);
if (G.logFD < 0) { if (G.logFD < 0) {
/* cannot open logfile? - print to /dev/console then */ /* 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) if (fd < 0)
fd = 2; /* then stderr, dammit */ fd = 2; /* then stderr, dammit */
full_write(fd, msg, len); full_write(fd, msg, len);