summaryrefslogtreecommitdiffstats
path: root/sys-utils/ipcmk.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/ipcmk.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/ipcmk.c')
-rw-r--r--sys-utils/ipcmk.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys-utils/ipcmk.c b/sys-utils/ipcmk.c
index eae493546..ff768c701 100644
--- a/sys-utils/ipcmk.c
+++ b/sys-utils/ipcmk.c
@@ -62,7 +62,7 @@ static int create_sem(int nsems, int permission)
static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
- fprintf(out, USAGE_HEADER);
+ fputs(USAGE_HEADER, out);
fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
fputs(USAGE_SEPARATOR, out);
@@ -70,14 +70,15 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
fputs(USAGE_OPTIONS, out);
fputs(_(" -M, --shmem <size> create shared memory segment of size <size>\n"), out);
- fputs(_(" -S, --semaphore <nsems> create semaphore array with <nsems> elements\n"), out);
+ fputs(_(" -S, --semaphore <number> create semaphore array with <number> elements\n"), out);
fputs(_(" -Q, --queue create message queue\n"), out);
fputs(_(" -p, --mode <mode> permission for the resource (default is 0644)\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("ipcmk(1)"));
+
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}