mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
initctl: minor, fix invalid format string for print_header()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
c39106906d
commit
0de5981948
1 file changed
+7
-15
+7
-15
@@ -374,13 +374,9 @@ static int dump_one_cond(const char *fpath, const struct stat *sb, int tflag, st
|
|||||||
static int do_cond_dump(char *arg)
|
static int do_cond_dump(char *arg)
|
||||||
{
|
{
|
||||||
col_widths();
|
col_widths();
|
||||||
if (heading) {
|
if (heading)
|
||||||
char title[80];
|
print_header("%-*s %-*s %-6s %s", pw, "PID", iw, "IDENT",
|
||||||
|
"STATUS", "CONDITION");
|
||||||
snprintf(title, sizeof(title), "%-*s %-*s %-6s %s", pw, "PID",
|
|
||||||
iw, "IDENT", "STATUS", "CONDITION");
|
|
||||||
print_header(title);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nftw(_PATH_COND, dump_one_cond, 20, 0) == -1) {
|
if (nftw(_PATH_COND, dump_one_cond, 20, 0) == -1) {
|
||||||
WARNX("Failed parsing %s", _PATH_COND);
|
WARNX("Failed parsing %s", _PATH_COND);
|
||||||
@@ -497,13 +493,9 @@ static int do_cond_show(char *arg)
|
|||||||
svc_t *svc;
|
svc_t *svc;
|
||||||
|
|
||||||
col_widths();
|
col_widths();
|
||||||
if (heading) {
|
if (heading)
|
||||||
char title[80];
|
print_header("%-*s %-*s %-6s %s", pw, "PID", iw, "IDENT",
|
||||||
|
"STATUS", "CONDITION (+ ON, ~ FLUX, - OFF)");
|
||||||
snprintf(title, sizeof(title), "%-*s %-*s %-6s %s", pw, "PID",
|
|
||||||
iw, "IDENT", "STATUS", "CONDITION (+ ON, ~ FLUX, - OFF)");
|
|
||||||
print_header(title);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (svc = client_svc_iterator(1); svc; svc = client_svc_iterator(0)) {
|
for (svc = client_svc_iterator(1); svc; svc = client_svc_iterator(0)) {
|
||||||
if (!svc->cond[0])
|
if (!svc->cond[0])
|
||||||
@@ -883,7 +875,7 @@ static int show_status(char *arg)
|
|||||||
else
|
else
|
||||||
strlcat(title, "COMMAND", sizeof(title));
|
strlcat(title, "COMMAND", sizeof(title));
|
||||||
|
|
||||||
print_header(title);
|
print_header("%s", title);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (svc = client_svc_iterator(1); svc; svc = client_svc_iterator(0)) {
|
for (svc = client_svc_iterator(1); svc; svc = client_svc_iterator(0)) {
|
||||||
|
|||||||
Reference in new issue
Block a user