]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ipcs: in usage show resource option as nonoptional when used with -i
authorBenno Schulenberg <bensberg@justemail.net>
Wed, 24 Dec 2014 16:56:02 +0000 (17:56 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 6 Jan 2015 10:40:01 +0000 (11:40 +0100)
Also, the resource option -a is not valid with -i, so show the valid
ones explicitly.  Also gettextize the synopsis as a single string, as
the two lines are tightly related and other synopses do this too.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
sys-utils/ipcs.c

index 3bfba0a7b7320f6d8f1594c8c51890eb86edead8..0542e2738fe3d4dbc5879efb635f4a58b2403a76 100644 (file)
@@ -50,13 +50,13 @@ static void print_msg (int id, int unit);
 static void __attribute__ ((__noreturn__)) usage(FILE * out)
 {
        fprintf(out, USAGE_HEADER);
-       fprintf(out, " %s [resource ...] [output-format]\n", program_invocation_short_name);
-       fprintf(out, " %s [resource] -i <id>\n", program_invocation_short_name);
+       fprintf(out, _(" %1$s [resource-option...] [output-option]\n"
+                      " %1$s -m|-q|-s -i <id>\n"), program_invocation_short_name);
 
        fputs(USAGE_SEPARATOR, out);
        fputs(_("Show information on IPC facilities.\n"), out);
 
-       fputs(USAGE_OPTIONS, out);
+       fprintf(out, USAGE_OPTIONS);
        fputs(_(" -i, --id <id>  print details on resource identified by <id>\n"), out);
        fprintf(out, USAGE_HELP);
        fprintf(out, USAGE_VERSION);
@@ -67,7 +67,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
        fputs(_(" -s, --semaphores  semaphores\n"), out);
        fputs(_(" -a, --all         all (default)\n"), out);
        fprintf(out, USAGE_SEPARATOR);
-       fputs(_("Output format:\n"), out);
+       fputs(_("Output options:\n"), out);
        fputs(_(" -t, --time        show attach, detach and change times\n"), out);
        fputs(_(" -p, --pid         show PIDs of creator and last operator\n"), out);
        fputs(_(" -c, --creator     show creator and owner\n"), out);