From 83445f1ebe1c1f8a30706debf20d671b3da19f24 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Mon, 16 Oct 2017 09:43:58 +0200 Subject: [PATCH] initctl: show, use '-' for runlevels service is not member of This patch adds a '-' for each runlevel a service/task is not part of. The resulting listings are easier to read and also makes it clearer to the user what happens when changing runlevels. Signed-off-by: Joachim Nilsson --- src/initctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/initctl.c b/src/initctl.c index 7f84c2d8..2c56b58b 100644 --- a/src/initctl.c +++ b/src/initctl.c @@ -445,6 +445,8 @@ char *runlevel_string(int runlevel, int levels) if (runlevel == i) pos = strlcat(lvl, "\e[0m", sizeof(lvl)); + } else { + lvl[pos++] = '-'; } }