diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-09-28 00:22:24 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-09-28 00:22:24 +0000 |
| commit | 49e9373b3231279b5acaf060c09121054f655023 (patch) | |
| tree | bfbed75fac55cda02e77dc7ed75b43480caed984 | |
| parent | e2b8022e7dca5ee139a82288a31098b8f55c273b (diff) | |
| download | s6-frontend-49e9373b3231279b5acaf060c09121054f655023.tar.gz | |
Transmit verbosity to s6-rc even for live status
| -rw-r--r-- | src/s6-frontend/live_status.c | 15 | ||||
| -rw-r--r-- | 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) ; |
