Add support for toggling the debug mode at runtime

This commit adds support for -d, --debug option to init, which can
be used to toggle the finit debug mode at runtime.

Signed-off-by: Mattias Walström <lazzer@gmail.com>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Mattias Walström
2013-05-19 19:01:44 +02:00
committed by Joachim Nilsson
parent c3b76fdccf
commit 5d04a72a61
3 changed files with 45 additions and 8 deletions
+2
View File
@@ -107,6 +107,8 @@ static void parse(void *UNUSED(arg), int fd, int UNUSED(events))
_d("Unsupported runlevel: %d", rq.runlevel);
break;
}
} else if (rq.cmd == INIT_CMD_DEBUG) {
debug = !debug;
} else {
_d("Unsupported cmd: %d", rq.cmd);
}