summaryrefslogtreecommitdiffstats
path: root/sys-utils/ipcrm.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/ipcrm.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/ipcrm.c')
-rw-r--r--sys-utils/ipcrm.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys-utils/ipcrm.c b/sys-utils/ipcrm.c
index 6e1f2226e..85de05a17 100644
--- a/sys-utils/ipcrm.c
+++ b/sys-utils/ipcrm.c
@@ -46,14 +46,14 @@ static int verbose = 0;
/* print the usage */
static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
- fprintf(out, USAGE_HEADER);
+ fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options]\n"
" %s shm|msg|sem <id>...\n"), program_invocation_short_name);
fputs(USAGE_SEPARATOR, out);
fputs(_("Remove certain IPC resources.\n"), out);
- fprintf(out, USAGE_OPTIONS);
+ fputs(USAGE_OPTIONS, out);
fputs(_(" -m, --shmem-id <id> remove shared memory segment by id\n"), out);
fputs(_(" -M, --shmem-key <key> remove shared memory segment by key\n"), out);
fputs(_(" -q, --queue-id <id> remove message queue by id\n"), out);
@@ -62,10 +62,12 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
fputs(_(" -S, --semaphore-key <key> remove semaphore by key\n"), out);
fputs(_(" -a, --all[=shm|msg|sem] remove all (in the specified category)\n"), out);
fputs(_(" -v, --verbose explain what is being done\n"), out);
- fprintf(out, USAGE_SEPARATOR);
- fprintf(out, USAGE_HELP);
- fprintf(out, USAGE_VERSION);
+
+ fputs(USAGE_SEPARATOR, out);
+ fputs(USAGE_HELP, out);
+ fputs(USAGE_VERSION, out);
fprintf(out, USAGE_MAN_TAIL("ipcrm(1)"));
+
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}