aboutsummaryrefslogtreecommitdiffstats
path: root/src/s6/process_restart.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2025-06-30 14:41:53 +0000
committerLaurent Bercot <ska@appnovation.com>2025-06-30 14:41:53 +0000
commit6d953b22ae50261812b27ba84ecd6dc33b2007de (patch)
tree82d61de117f1e8ec02522c3d2eb40bd78877c543 /src/s6/process_restart.c
parent8a6eaed305dbe4ec6a87fe37000f7461bf563937 (diff)
downloads6-frontend-6d953b22ae50261812b27ba84ecd6dc33b2007de.tar.gz
Adapt to new gol
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/s6/process_restart.c')
-rw-r--r--src/s6/process_restart.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/s6/process_restart.c b/src/s6/process_restart.c
index 9e8c083..73e66f3 100644
--- a/src/s6/process_restart.c
+++ b/src/s6/process_restart.c
@@ -12,27 +12,27 @@
#define USAGE "s6 process restart [ -W|--nowait ] services..."
#define dieusage() strerr_dieusage(100, USAGE)
-enum process_restart_golb_e
+enum golb_e
{
- PROCESS_RESTART_GOLB_WAIT,
- PROCESS_RESTART_GOLB_N
+ GOLB_WAIT,
+ GOLB_N
} ;
-static gol_bool const process_restart_golb[2] =
+static gol_bool const rgolb[2] =
{
- { .so = 'W', .lo = "nowait", .set = 0, .mask = 1 << PROCESS_RESTART_GOLB_WAIT },
- { .so = 'w', .lo = "wait", .set = 1, .mask = 1 << PROCESS_RESTART_GOLB_WAIT }
+ { .so = 'W', .lo = "nowait", .clear = 1 << GOLB_WAIT, .set = 0 },
+ { .so = 'w', .lo = "wait", .clear = 0, .set = 1 << GOLB_WAIT }
} ;
int process_restart (char const *const *argv)
{
- uint64_t golb = 1 << PROCESS_RESTART_GOLB_WAIT ;
+ uint64_t wgolb = 1 << GOLB_WAIT ;
size_t argc ;
PROG = "s6 process restart" ;
- argv += gol_argv(argv, process_restart_golb, 2, 0, 0, &golb, 0) ;
+ argv += gol_argv(argv, rgolb, 2, 0, 0, &wgolb, 0) ;
if (!argv) dieusage() ;
argc = env_len(argv) ;
process_check_services(argv, argc) ;
- return process_send_svc(golb & 1 << PROCESS_RESTART_GOLB_WAIT ? "-rwR" : "-r", argv, argc) ;
+ return process_send_svc(wgolb & 1 << GOLB_WAIT ? "-rwR" : "-r", argv, argc) ;
}