printf("tail:%d\n", G.shbuf->tail);
}
#else
-void ipcsyslog_cleanup(void);
-void ipcsyslog_init(void);
+static void ipcsyslog_cleanup(void) {}
+static void ipcsyslog_init(void) {}
void log_to_shmem(const char *msg);
#endif /* FEATURE_IPC_SYSLOG */
write(G.kmsgfd, G.printbuf, sprintf(G.printbuf, "<%d>%s\n", pri, msg));
}
#else
-void kmsg_init(void);
-void kmsg_cleanup(void);
-void log_to_kmsg(int pri, const char *msg);
+static void kmsg_init(void) {}
+static void kmsg_cleanup(void) {}
+static void log_to_kmsg(int pri UNUSED_PARAM, const char *msg UNUSED_PARAM) {}
#endif /* FEATURE_KMSG_SYSLOG */
/* Print a message to the log file. */
}
timestamp[15] = '\0';
- if (ENABLE_FEATURE_KMSG_SYSLOG && (option_mask32 & OPT_kmsg)) {
+ if (option_mask32 & OPT_kmsg) {
log_to_kmsg(pri, msg);
return;
}
#endif
sock_fd = create_socket();
- if (ENABLE_FEATURE_IPC_SYSLOG && (option_mask32 & OPT_circularlog)) {
+ if (option_mask32 & OPT_circularlog)
ipcsyslog_init();
- }
- if (ENABLE_FEATURE_KMSG_SYSLOG && (option_mask32 & OPT_kmsg))
+ if (option_mask32 & OPT_kmsg)
kmsg_init();
timestamp_and_log_internal("syslogd started: BusyBox v" BB_VER);
timestamp_and_log_internal("syslogd exiting");
puts("syslogd exiting");
remove_pidfile(CONFIG_PID_FILE_PATH "/syslogd.pid");
- if (ENABLE_FEATURE_IPC_SYSLOG)
- ipcsyslog_cleanup();
- if (ENABLE_FEATURE_KMSG_SYSLOG && (option_mask32 & OPT_kmsg))
+ ipcsyslog_cleanup();
+ if (option_mask32 & OPT_kmsg)
kmsg_cleanup();
kill_myself_with_sig(bb_got_signal);
#undef recvbuf