mirror of
https://github.com/troglobit/finit.git
synced 2026-10-14 10:19:36 +00:00
Minor, staticify, reduce includes and allow debug to kmsg
The loglevel setting should control all logging, regardless of where we target it. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
3ed291789c
commit
e0a65f67c9
1 file changed
+3
-3
@@ -22,7 +22,6 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <sched.h> /* sched_yield() */
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <lite/lite.h>
|
||||
@@ -56,7 +55,7 @@ void log_exit(void)
|
||||
enable_progress(1);
|
||||
}
|
||||
|
||||
void log_open(void)
|
||||
static void log_open(void)
|
||||
{
|
||||
int opts = LOG_PID;
|
||||
|
||||
@@ -100,11 +99,12 @@ void logit(int prio, const char *fmt, ...)
|
||||
if (up || fexist("/dev/log")) {
|
||||
if (!up)
|
||||
log_open();
|
||||
|
||||
vsyslog(prio, fmt, ap);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!debug && prio > loglevel)
|
||||
if (prio > loglevel)
|
||||
goto done;
|
||||
|
||||
fp = fopen("/dev/kmsg", "w");
|
||||
|
||||
Reference in new issue
Block a user