aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init/init.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/init/init.c b/init/init.c
index 528122580..95d7253ea 100644
--- a/init/init.c
+++ b/init/init.c
@@ -39,7 +39,6 @@
39#include <limits.h> 39#include <limits.h>
40#include <sys/fcntl.h> 40#include <sys/fcntl.h>
41#include <sys/ioctl.h> 41#include <sys/ioctl.h>
42#include <sys/mount.h>
43#include <sys/types.h> 42#include <sys/types.h>
44#include <sys/wait.h> 43#include <sys/wait.h>
45#include <sys/reboot.h> 44#include <sys/reboot.h>
@@ -239,7 +238,7 @@ static void message(int device, const char *fmt, ...)
239 /* Take full control of the log tty, and never close it. 238 /* Take full control of the log tty, and never close it.
240 * It's mine, all mine! Muhahahaha! */ 239 * It's mine, all mine! Muhahahaha! */
241 if (log_fd < 0) { 240 if (log_fd < 0) {
242 if ((log_fd = device_open(log_console, O_RDWR | O_NDELAY | O_NOCTTY)) < 0) { 241 if ((log_fd = device_open(log_console, O_RDWR | O_NONBLOCK | O_NOCTTY)) < 0) {
243 log_fd = -2; 242 log_fd = -2;
244 bb_error_msg("Bummer, can't write to log on %s!", log_console); 243 bb_error_msg("Bummer, can't write to log on %s!", log_console);
245 device = CONSOLE; 244 device = CONSOLE;
@@ -254,7 +253,7 @@ static void message(int device, const char *fmt, ...)
254 253
255 if (device & CONSOLE) { 254 if (device & CONSOLE) {
256 int fd = device_open(_PATH_CONSOLE, 255 int fd = device_open(_PATH_CONSOLE,
257 O_WRONLY | O_NOCTTY | O_NDELAY); 256 O_WRONLY | O_NOCTTY | O_NONBLOCK);
258 /* Always send console messages to /dev/console so people will see them. */ 257 /* Always send console messages to /dev/console so people will see them. */
259 if (fd >= 0) { 258 if (fd >= 0) {
260 bb_full_write(fd, msg, l); 259 bb_full_write(fd, msg, l);