From 7009af0e0dbce1bac5d16be89a43077badf0f897 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 24 Dec 2014 17:56:10 +0100 Subject: ipc*: use customary fputs() instead of fprintf() with the usage macros Also use the clearer word with the --semaphore option. Signed-off-by: Benno Schulenberg --- sys-utils/ipcmk.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sys-utils/ipcmk.c') 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 create shared memory segment of size \n"), out); - fputs(_(" -S, --semaphore create semaphore array with elements\n"), out); + fputs(_(" -S, --semaphore create semaphore array with elements\n"), out); fputs(_(" -Q, --queue create message queue\n"), out); fputs(_(" -p, --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); } -- cgit v1.2.3-55-g7522