Fix initctl debug toggle regression introduced in ae09272b

Calling `initctl debug` is supposed to toggle Finit debug messages on
the boot console.  This broke in ae09272b when improving support for
running Finit in containers.

Part of this change is a slight refactor of who calles log_init() when
starting up, and when to call ttinit().  We now call ttinit() every time
we toggle debug.

Also, toggling back to normal logging had a bug.  The new default log
level for Finit is LOG_INFO, but toggling back set it to LOG_NOTICE.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2022-04-14 11:55:17 +02:00
1 parent 3d91112e0d
commit 01cb088e51
4 files changed
+14 -13

No files matched your search

+1 -1
View File
@@ -81,7 +81,7 @@ char *console(void)
void console_init(void)
{
ttinit();
log_init();
}
ssize_t cprintf(const char *fmt, ...)