aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysklogd/syslogd.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index e754806da..3d94069e2 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -319,9 +319,8 @@ static void message(char *fmt, ...)
319 319
320 } else 320 } else
321#endif 321#endif
322 if ((fd = 322 if ((fd = device_open(logFilePath,
323 device_open(logFilePath, 323 O_WRONLY | O_CREAT | O_NOCTTY | O_APPEND |
324 O_WRONLY | O_CREAT | O_NOCTTY | O_APPEND |
325 O_NONBLOCK)) >= 0) { 324 O_NONBLOCK)) >= 0) {
326 fl.l_type = F_WRLCK; 325 fl.l_type = F_WRLCK;
327 fcntl(fd, F_SETLKW, &fl); 326 fcntl(fd, F_SETLKW, &fl);
@@ -363,8 +362,7 @@ static void message(char *fmt, ...)
363 close(fd); 362 close(fd);
364 } else { 363 } else {
365 /* Always send console messages to /dev/console so people will see them. */ 364 /* Always send console messages to /dev/console so people will see them. */
366 if ((fd = 365 if ((fd = device_open(_PATH_CONSOLE,
367 device_open(_PATH_CONSOLE,
368 O_WRONLY | O_NOCTTY | O_NONBLOCK)) >= 0) { 366 O_WRONLY | O_NOCTTY | O_NONBLOCK)) >= 0) {
369 va_start(arguments, fmt); 367 va_start(arguments, fmt);
370 vdprintf(fd, fmt, arguments); 368 vdprintf(fd, fmt, arguments);
@@ -400,7 +398,7 @@ static void logMessage(int pri, char *msg)
400{ 398{
401 time_t now; 399 time_t now;
402 char *timestamp; 400 char *timestamp;
403 static char res[20] = ""; 401 static char res[20];
404#ifdef CONFIG_FEATURE_REMOTE_LOG 402#ifdef CONFIG_FEATURE_REMOTE_LOG
405 static char line[MAXLINE + 1]; 403 static char line[MAXLINE + 1];
406#endif 404#endif