summaryrefslogtreecommitdiffstats
path: root/sys-utils/ipcs.c
diff options
context:
space:
mode:
authorBenno Schulenberg2014-12-24 17:56:10 +0100
committerKarel Zak2015-01-06 11:50:18 +0100
commit7009af0e0dbce1bac5d16be89a43077badf0f897 (patch)
treecb3d026c1275fd466be31365b4a13b4df964ae79 /sys-utils/ipcs.c
parenttailf: slice up the usage text for ease of translation (diff)
downloadkernel-qcow2-util-linux-7009af0e0dbce1bac5d16be89a43077badf0f897.tar.gz
kernel-qcow2-util-linux-7009af0e0dbce1bac5d16be89a43077badf0f897.tar.xz
kernel-qcow2-util-linux-7009af0e0dbce1bac5d16be89a43077badf0f897.zip
ipc*: use customary fputs() instead of fprintf() with the usage macros
Also use the clearer word <number> with the --semaphore option. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Diffstat (limited to 'sys-utils/ipcs.c')
-rw-r--r--sys-utils/ipcs.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c
index 0542e2738..74d87662f 100644
--- a/sys-utils/ipcs.c
+++ b/sys-utils/ipcs.c
@@ -49,24 +49,26 @@ static void print_msg (int id, int unit);
static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
- fprintf(out, USAGE_HEADER);
+ fputs(USAGE_HEADER, out);
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);
- fprintf(out, USAGE_OPTIONS);
+ fputs(USAGE_OPTIONS, out);
fputs(_(" -i, --id <id> print details on resource identified by <id>\n"), out);
- fprintf(out, USAGE_HELP);
- fprintf(out, USAGE_VERSION);
- fprintf(out, USAGE_SEPARATOR);
+ fputs(USAGE_HELP, out);
+ fputs(USAGE_VERSION, out);
+
+ fputs(USAGE_SEPARATOR, out);
fputs(_("Resource options:\n"), out);
fputs(_(" -m, --shmems shared memory segments\n"), out);
fputs(_(" -q, --queues message queues\n"), out);
fputs(_(" -s, --semaphores semaphores\n"), out);
fputs(_(" -a, --all all (default)\n"), out);
- fprintf(out, USAGE_SEPARATOR);
+
+ fputs(USAGE_SEPARATOR, 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);
@@ -76,6 +78,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
fputs(_(" --human show sizes in human-readable format\n"), out);
fputs(_(" -b, --bytes show sizes in bytes\n"), out);
fprintf(out, USAGE_MAN_TAIL("ipcs(1)"));
+
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}