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 <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-10-16 09:43:58 +02:00
parent e88241316b
commit 83445f1ebe
+2
View File
@@ -445,6 +445,8 @@ char *runlevel_string(int runlevel, int levels)
if (runlevel == i)
pos = strlcat(lvl, "\e[0m", sizeof(lvl));
} else {
lvl[pos++] = '-';
}
}