diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-18 05:43:05 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-18 05:43:05 +0000 |
commit | 70ab28f90776de54cd136a411b2914b1b88cc3de (patch) | |
tree | 29fa4f8623d91ff11ade01416f7d0ac0ae5d09ee | |
parent | fbe5f39f0fe0439678581fdad153f1df437f395d (diff) | |
download | busybox-w32-70ab28f90776de54cd136a411b2914b1b88cc3de.tar.gz busybox-w32-70ab28f90776de54cd136a411b2914b1b88cc3de.tar.bz2 busybox-w32-70ab28f90776de54cd136a411b2914b1b88cc3de.zip |
syslogd: use DEV_CONSOLE consistently
init: remove obsolete comment
-rw-r--r-- | init/init.c | 4 | ||||
-rw-r--r-- | sysklogd/syslogd.c | 2 |
2 files changed, 1 insertions, 5 deletions
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 @@ | |||
11 | 11 | ||
12 | #include "libbb.h" | 12 | #include "libbb.h" |
13 | #include <paths.h> | 13 | #include <paths.h> |
14 | //#include <signal.h> | ||
15 | //#include <sys/ioctl.h> | ||
16 | //#include <sys/wait.h> | ||
17 | #include <sys/reboot.h> | 14 | #include <sys/reboot.h> |
18 | 15 | ||
19 | #if ENABLE_FEATURE_INIT_SYSLOG | 16 | #if ENABLE_FEATURE_INIT_SYSLOG |
@@ -977,7 +974,6 @@ int init_main(int argc, char **argv) | |||
977 | BB_EXECVP(argv[0], argv); | 974 | BB_EXECVP(argv[0], argv); |
978 | } else if (enforce > 0) { | 975 | } else if (enforce > 0) { |
979 | /* SELinux in enforcing mode but load_policy failed */ | 976 | /* SELinux in enforcing mode but load_policy failed */ |
980 | /* At this point, we probably can't open /dev/console, so log() won't work */ | ||
981 | message(L_CONSOLE, "Cannot load SELinux Policy. " | 977 | message(L_CONSOLE, "Cannot load SELinux Policy. " |
982 | "Machine is in enforcing mode. Halting now."); | 978 | "Machine is in enforcing mode. Halting now."); |
983 | exit(1); | 979 | 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) | |||
299 | | O_NOCTTY | O_APPEND | O_NONBLOCK); | 299 | | O_NOCTTY | O_APPEND | O_NONBLOCK); |
300 | if (G.logFD < 0) { | 300 | if (G.logFD < 0) { |
301 | /* cannot open logfile? - print to /dev/console then */ | 301 | /* cannot open logfile? - print to /dev/console then */ |
302 | int fd = device_open(_PATH_CONSOLE, O_WRONLY | O_NOCTTY | O_NONBLOCK); | 302 | int fd = device_open(DEV_CONSOLE, O_WRONLY | O_NOCTTY | O_NONBLOCK); |
303 | if (fd < 0) | 303 | if (fd < 0) |
304 | fd = 2; /* then stderr, dammit */ | 304 | fd = 2; /* then stderr, dammit */ |
305 | full_write(fd, msg, len); | 305 | full_write(fd, msg, len); |