From: Benno Schulenberg Date: Mon, 31 Mar 2025 09:44:34 +0000 (+0200) Subject: enosys: add the missing arguments of -s and -i to the usage text X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b8cf5570f98ecba563ae57575e96745676264758;p=thirdparty%2Futil-linux.git enosys: add the missing arguments of -s and -i to the usage text Also, add a docstring, drop the redundant double dash from the synopsis, add the missing -m option, and add a missing word to an error message. CC: Thomas Weißschuh Signed-off-by: Benno Schulenberg --- diff --git a/misc-utils/enosys.c b/misc-utils/enosys.c index 1410676dd..b7469c6bf 100644 --- a/misc-utils/enosys.c +++ b/misc-utils/enosys.c @@ -78,13 +78,17 @@ static void __attribute__((__noreturn__)) usage(void) FILE *out = stdout; fputs(USAGE_HEADER, out); - fprintf(out, _(" %s [options] -- \n"), program_invocation_short_name); + fprintf(out, _(" %s [options] \n"), program_invocation_short_name); + + fputs(USAGE_SEPARATOR, out); + fputs(_("Block certain system calls while running a command.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(_(" -s, --syscall syscall to block\n"), out); - fputs(_(" -i, --ioctl ioctl to block\n"), out); - fputs(_(" -l, --list list known syscalls\n"), out); - fputs(_(" -d, --dump[=] dump seccomp bytecode\n"), out); + fputs(_(" -s, --syscall | system call to block\n"), out); + fputs(_(" -i, --ioctl | ioctl to block\n"), out); + fputs(_(" -l, --list list known system calls\n"), out); + fputs(_(" -m, --list-ioctl list known ioctls\n"), out); + fputs(_(" -d, --dump[=] dump bytecode of seccomp filter\n"), out); fputs(USAGE_SEPARATOR, out); fprintf(out, USAGE_HELP_OPTIONS(25)); @@ -297,7 +301,7 @@ int main(int argc, char **argv) err_nosys(EXIT_FAILURE, _("Could not run prctl(PR_SET_NO_NEW_PRIVS)")); if (ul_set_seccomp_filter_spec_allow(&prog)) - err_nosys(EXIT_FAILURE, _("Could not seccomp filter")); + err_nosys(EXIT_FAILURE, _("Could not set seccomp filter")); if (execvp(argv[optind], argv + optind)) err(EXIT_NOTSUPP, _("Could not exec"));