aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2026-05-12 21:02:59 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2026-05-12 21:02:59 +0000
commit9f8a0daa7aebd3d3673e26949b44864e4b3a450d (patch)
tree4450e812252a2579d2e92dd085c68625b2a3bb1b /src
parent557ff039d9c1018c7100062e587550a9509a2b6d (diff)
downloads6-frontend-9f8a0daa7aebd3d3673e26949b44864e4b3a450d.tar.gz
Add verbosity; update s6 version doc
Diffstat (limited to 'src')
-rw-r--r--src/s6-frontend/version_export.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/s6-frontend/version_export.c b/src/s6-frontend/version_export.c
index 14e0de3..b62b8ac 100644
--- a/src/s6-frontend/version_export.c
+++ b/src/s6-frontend/version_export.c
@@ -2,6 +2,7 @@
#include <unistd.h>
+#include <skalibs/types.h>
#include <skalibs/buffer.h>
#include <skalibs/gol.h>
#include <skalibs/stralloc.h>
@@ -50,6 +51,9 @@ void version_export (char const *const *argv)
stralloc sa = STRALLOC_ZERO ;
uint64_t wgolb = 0 ;
out_func_ref f = &print_unquoted ;
+ size_t len ;
+ char fmt[UINT_FMT] ;
+
argv += gol_argv(argv, rgolb, 1, 0, 0, &wgolb, 0) ;
if (wgolb & GOLB_QUOTE) f = &print_quoted ;
@@ -60,6 +64,8 @@ void version_export (char const *const *argv)
(*f)("bootdb", g->dirs.scan, &sa) ;
(*f)("stmpdir", g->dirs.stmp, &sa) ;
(*f)("storelist", g->dirs.stol, &sa) ;
- if (!buffer_flush(buffer_1)) dieout() ;
+ len = uint_fmt(fmt, g->verbosity) ; fmt[len++] = '\n' ;
+ if (!buffer_puts(buffer_1, "verbosity=")
+ || !buffer_putflush(buffer_1, fmt, len)) dieout() ;
_exit(0) ;
}