From 0336fff776b78ad7ccb2fa82fac53cd67905316c Mon Sep 17 00:00:00 2001 From: obarun <eric@obarun.org> Date: Mon, 4 Dec 2023 20:35:13 +1100 Subject: [PATCH] fix number of opts available --- src/include/66/svc.h | 2 +- src/lib66/exec/ssexec_help.c | 2 +- src/lib66/exec/ssexec_signal.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/include/66/svc.h b/src/include/66/svc.h index 93522281..6918af3f 100644 --- a/src/include/66/svc.h +++ b/src/include/66/svc.h @@ -25,7 +25,7 @@ #include <66/service.h> -#define DATASIZE 63 +#define DATASIZE 64 #define SVC_FLAGS_STARTING 1 // 1 starting not really up #define SVC_FLAGS_STOPPING (1 << 1) // 2 stopping not really down diff --git a/src/lib66/exec/ssexec_help.c b/src/lib66/exec/ssexec_help.c index 8ccfe99e..de38f660 100644 --- a/src/lib66/exec/ssexec_help.c +++ b/src/lib66/exec/ssexec_help.c @@ -249,7 +249,7 @@ char const *help_remove = " -P: do not propagate signal to its dependencies at stop process\n" ; -char const *usage_signal = "66 signal [ -h ] [ -wu | -wU | -wd | -wD | -wr | -wR ] [ -abqHkti12pcyodDuUxOr ] service..." ; +char const *usage_signal = "66 signal [ -h ] [ -wu | -wU | -wd | -wD | -wr | -wR ] [ -abqHkti12pcysodDuUxOr ] service..." ; char const *help_signal = "\nsend a signal to services\n" diff --git a/src/lib66/exec/ssexec_signal.c b/src/lib66/exec/ssexec_signal.c index e3b0c475..3b19ec0b 100644 --- a/src/lib66/exec/ssexec_signal.c +++ b/src/lib66/exec/ssexec_signal.c @@ -21,6 +21,7 @@ #include <skalibs/sgetopt.h> #include <skalibs/nsig.h> +#include <skalibs/sig.h> #include <66/svc.h> #include <66/config.h> @@ -94,6 +95,7 @@ int ssexec_signal(int argc, char const *const *argv, ssexec_t *info) if (opt == -1) break ; switch (opt) { + case 'h' : info_help(info->help, info->usage) ; return 0 ; case 's' : { int sig ; @@ -103,7 +105,6 @@ int ssexec_signal(int argc, char const *const *argv, ssexec_t *info) log_die(LOG_EXIT_USER, l.arg, " is not in the list of user-available signals") ; opt = cmdsig[sig] ; } - case 'h' : info_help(info->help, info->usage) ; return 0 ; case 'a' : case 'b' : case 'q' : -- GitLab