From a5c5a5c64462df3dfb33e15fd1bf1ca2e8eda385 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Tue, 1 Dec 2015 22:36:16 +0100 Subject: [PATCH] Allow debug mode to override terse mode Signed-off-by: Joachim Nilsson --- api.c | 4 ++++ finit.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/api.c b/api.c index d091e9e2..4465f402 100644 --- a/api.c +++ b/api.c @@ -266,6 +266,10 @@ static void cb(uev_t *w, void *UNUSED(arg), int UNUSED(events)) case INIT_CMD_DEBUG: debug = !debug; + if (debug) + verbose = 1; + else + verbose = quiet ? 0 : VERBOSE_MODE; break; case INIT_CMD_RELOAD: /* 'init q' and 'initctl reload' */ diff --git a/finit.c b/finit.c index 026a397e..67c936b2 100644 --- a/finit.c +++ b/finit.c @@ -218,7 +218,7 @@ int main(int argc, char* argv[]) tty_runlevel(runlevel); /* Disable verbose mode, if selected */ - if (quiet) + if (quiet && !debug) verbose = 0; /* Start new initctl API responder */