From 49e9373b3231279b5acaf060c09121054f655023 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 28 Sep 2026 00:22:24 +0000 Subject: Transmit verbosity to s6-rc even for live status --- src/s6-frontend/live_status.c | 15 ++++++++++++--- src/s6-frontend/set_check.c | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/s6-frontend/live_status.c b/src/s6-frontend/live_status.c index b65eab7..ace8357 100644 --- a/src/s6-frontend/live_status.c +++ b/src/s6-frontend/live_status.c @@ -30,14 +30,17 @@ static void live_status_all (int withe) { unsigned int m = 0 ; size_t llen = strlen(g->dirs.live) ; - char const *argv[23] ; + char const *argv[27] ; char llivedir[llen + 3] ; + char fmtv[UINT_FMT + 2] = " " ; llivedir[0] = ' ' ; llivedir[1] = ' ' ; memcpy(llivedir + 2, g->dirs.live, llen + 1) ; - + fmtv[2 + uint_fmt(fmtv + 2, g->verbosity)] = 0 ; argv[m++] = EXECLINE_EXTBINPREFIX "if" ; argv[m++] = " " EXECLINE_EXTBINPREFIX "pipeline" ; argv[m++] = " " S6RC_EXTBINPREFIX "s6-rc" ; + argv[m++] = " -v" ; + argv[m++] = fmtv ; argv[m++] = " -l" ; argv[m++] = llivedir ; argv[m++] = withe ? " -cbE" : " -cbe" ; @@ -49,6 +52,8 @@ static void live_status_all (int withe) argv[m++] = "" ; argv[m++] = EXECLINE_EXTBINPREFIX "pipeline" ; argv[m++] = " " S6RC_EXTBINPREFIX "s6-rc" ; + argv[m++] = " -v" ; + argv[m++] = fmtv + 1 ; argv[m++] = " -l" ; argv[m++] = llivedir + 1 ; argv[m++] = withe ? " -cbE" : " -cbe" ; @@ -110,10 +115,12 @@ static void live_status_some (char const *const *services, int withe) unsigned int m = 0 ; int e ; size_t llen = strlen(g->dirs.live) ; + char const *argv[28] ; char llivedir[llen + 2] ; + char fmtv[UINT_FMT + 1] = " " ; llivedir[0] = ' ' ; memcpy(llivedir + 1, g->dirs.live, llen + 1) ; - char const *argv[26] ; + fmtv[1 + uint_fmt(fmtv + 1, g->verbosity)] = 0 ; if (!stralloc_catb(&sa, " ", 1)) dienomem() ; e = get_atomics(services, env_len(services), &sa, withe) ; if (e) _exit(e) ; @@ -135,6 +142,8 @@ static void live_status_some (char const *const *services, int withe) argv[m++] = "4" ; argv[m++] = EXECLINE_EXTBINPREFIX "pipeline" ; argv[m++] = " " S6RC_EXTBINPREFIX "s6-rc" ; + argv[m++] = " -v" ; + argv[m++] = fmtv ; argv[m++] = " -l" ; argv[m++] = llivedir ; argv[m++] = withe ? " -cbE" : " -cbe" ; diff --git a/src/s6-frontend/set_check.c b/src/s6-frontend/set_check.c index f0cd536..bbbe6e9 100644 --- a/src/s6-frontend/set_check.c +++ b/src/s6-frontend/set_check.c @@ -42,7 +42,7 @@ void set_check (char const *const *argv) char const *wgola[GOLA_N] = { [GOLA_SET] = "current" } ; unsigned int m = 0 ; char const *newargv[11] ; - char fmtv[UINT_FMT] = " " ; + char fmtv[UINT_FMT] ; argv += GOL_argv(argv, rgolb, rgola, &wgolb, wgola) ; -- cgit v1.3.1