mirror of
https://github.com/troglobit/finit.git
synced 2026-11-09 16:21:24 +00:00
initctl: disable ctrl chars also in runlevel_string() when -p
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
6dec4c9ca0
commit
93402b81d7
1 file changed
+2
-2
+2
-2
@@ -506,7 +506,7 @@ char *runlevel_string(int runlevel, int levels)
|
|||||||
|
|
||||||
for (i = 0; i < 10; i++) {
|
for (i = 0; i < 10; i++) {
|
||||||
if (ISSET(levels, i)) {
|
if (ISSET(levels, i)) {
|
||||||
if (runlevel == i)
|
if (!plain && runlevel == i)
|
||||||
pos = strlcat(lvl, "\e[1m", sizeof(lvl));
|
pos = strlcat(lvl, "\e[1m", sizeof(lvl));
|
||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
@@ -514,7 +514,7 @@ char *runlevel_string(int runlevel, int levels)
|
|||||||
else
|
else
|
||||||
lvl[pos++] = '0' + i;
|
lvl[pos++] = '0' + i;
|
||||||
|
|
||||||
if (runlevel == i)
|
if (!plain && runlevel == i)
|
||||||
pos = strlcat(lvl, "\e[0m", sizeof(lvl));
|
pos = strlcat(lvl, "\e[0m", sizeof(lvl));
|
||||||
} else {
|
} else {
|
||||||
lvl[pos++] = '-';
|
lvl[pos++] = '-';
|
||||||
|
|||||||
Reference in new issue
Block a user