summaryrefslogtreecommitdiffstats
path: root/sys-utils/ipcrm.c
diff options
context:
space:
mode:
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);
}