mirror of
https://github.com/troglobit/finit.git
synced 2026-11-02 13:20:32 +00:00
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:
1 parent
e88241316b
commit
83445f1ebe
1 file changed
+2
@@ -445,6 +445,8 @@ char *runlevel_string(int runlevel, int levels)
|
|||||||
|
|
||||||
if (runlevel == i)
|
if (runlevel == i)
|
||||||
pos = strlcat(lvl, "\e[0m", sizeof(lvl));
|
pos = strlcat(lvl, "\e[0m", sizeof(lvl));
|
||||||
|
} else {
|
||||||
|
lvl[pos++] = '-';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user