diff options
Diffstat (limited to 'sys-utils/ipcrm.c')
| -rw-r--r-- | sys-utils/ipcrm.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/sys-utils/ipcrm.c b/sys-utils/ipcrm.c index 11adf2f80d..8ddb104f44 100644 --- a/sys-utils/ipcrm.c +++ b/sys-utils/ipcrm.c @@ -56,17 +56,18 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Remove certain IPC resources.\n"), out); 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(_(" --posix-shmem <name> remove POSIX shared memory segment by name\n"), out); - fputs(_(" -q, --queue-id <id> remove message queue by id\n"), out); - fputs(_(" -Q, --queue-key <key> remove message queue by key\n"), out); - fputs(_(" --posix-mqueue <name> remove POSIX message queue by name\n"), out); - fputs(_(" -s, --semaphore-id <id> remove semaphore by id\n"), out); - fputs(_(" -S, --semaphore-key <key> remove semaphore by key\n"), out); - fputs(_(" --posix-semaphore <name> remove POSIX semaphore by name\n"), out); - fputs(_(" -a, --all[=shm|pshm|msg|pmsg|sem|psem] remove all (in the specified category)\n"), out); - fputs(_(" -v, --verbose explain what is being done\n"), 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(_(" --posix-shmem <name> remove POSIX shared memory segment by name\n"), out); + fputs(_(" -q, --queue-id <id> remove message queue by id\n"), out); + fputs(_(" -Q, --queue-key <key> remove message queue by key\n"), out); + fputs(_(" --posix-mqueue <name> remove POSIX message queue by name\n"), out); + fputs(_(" -s, --semaphore-id <id> remove semaphore by id\n"), out); + fputs(_(" -S, --semaphore-key <key> remove semaphore by key\n"), out); + fputs(_(" --posix-semaphore <name> remove POSIX semaphore by name\n"), out); + fputs(_(" -a, --all[=shm|pshm|msg|pmsg|sem|psem]\n" + " remove all (in the specified category)\n"), out); + fputs(_(" -v, --verbose explain what is being done\n"), out); fputs(USAGE_SEPARATOR, out); fprintf(out, USAGE_HELP_OPTIONS(28)); @@ -173,7 +174,7 @@ static int deprecated_main(int argc, char **argv) return 1; } -static unsigned long strtokey(const char *str, const char *errmesg) +static unsigned long strtokey(const char *str) { unsigned long num; char *end = NULL; @@ -190,9 +191,9 @@ static unsigned long strtokey(const char *str, const char *errmesg) return num; err: if (errno) - err(EXIT_FAILURE, "%s: '%s'", errmesg, str); + err(EXIT_FAILURE, _("failed to parse argument: '%s'"), str); else - errx(EXIT_FAILURE, "%s: '%s'", errmesg, str); + errx(EXIT_FAILURE, _("failed to parse argument: '%s'"), str); return 0; } @@ -200,7 +201,7 @@ static int key_to_id(type_id type, char *s) { int id; /* keys are in hex or decimal */ - key_t key = strtokey(s, "failed to parse argument"); + key_t key = strtokey(s); if (key == IPC_PRIVATE) { warnx(_("illegal key (%s)"), s); return -1; |
