mirror of
https://github.com/troglobit/finit.git
synced 2026-10-31 13:00:32 +00:00
log.c: New log_exit() function, called at shutdown
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
8ce330bcdb
commit
1036c365b8
4 files changed
+21
-15
No files matched your search
@@ -22,6 +22,7 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <sched.h> /* sched_yield() */
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <lite/lite.h>
|
||||
@@ -31,6 +32,18 @@
|
||||
|
||||
static int loglevel = LOG_NOTICE;
|
||||
|
||||
/* If we enabled terse mode at boot, restore to previous setting at shutdown */
|
||||
void log_exit(void)
|
||||
{
|
||||
if (quiet) {
|
||||
silent = SILENT_MODE;
|
||||
if (!silent) {
|
||||
sched_yield();
|
||||
fputs("\n", stderr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void log_debug(void)
|
||||
{
|
||||
debug = !debug;
|
||||
|
||||
Reference in new issue
Block a user