Pretty printing of current runlevel in initctl show

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2015-11-22 15:58:32 +01:00
parent 4ada42f380
commit f38dfaf2dc
2 changed files with 14 additions and 4 deletions
+2 -2
View File
@@ -144,7 +144,7 @@ static int show_status(char *UNUSED(arg))
runlevel = runlevel_get();
if (!verbose) {
printf("# Status PID Runlevels Service Description\n");
printf("# Status PID Runlevels Service Description\n");
printf("====================================================================================\n");
}
@@ -156,7 +156,7 @@ static int show_status(char *UNUSED(arg))
else
snprintf(jobid, sizeof(jobid), "%d:%d", svc->job, svc->id);
printf("%-5s %7s %-6d %-9s ", jobid, svc_status(svc), svc->pid, runlevel_string(svc->runlevels));
printf("%-5s %7s %-6d %-18.18s ", jobid, svc_status(svc), svc->pid, runlevel_string(svc->runlevels));
if (!verbose) {
printf("%-20s %s\n", svc->cmd, svc->desc);
continue;