[PATCH 01/10] enosys: add the missing arguments of -s and -i to the usage text

Benno Schulenberg <[email protected]>
Newsgroups org.kernel.vger.util-linux
Message-ID <[email protected]>
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 <[email protected]>
Signed-off-by: Benno Schulenberg <[email protected]>
---
 misc-utils/enosys.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

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] -- <command>\n"), program_invocation_short_name);
+	fprintf(out, _(" %s [options] <command>\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[=<file>]     dump seccomp bytecode\n"), out);
+	fputs(_(" -s, --syscall <name>|<nr>    system call to block\n"), out);
+	fputs(_(" -i, --ioctl <name>|<nr>      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[=<file>]          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"));
-- 
2.48.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.