summaryrefslogtreecommitdiffstats
path: root/sys-utils/renice.c
diff options
context:
space:
mode:
authorSami Kerola2014-09-06 00:11:00 +0200
committerSami Kerola2014-09-19 20:31:12 +0200
commit6dcc066f3b2cad8b2bc6ed8d97da15555692ef8c (patch)
treec94e10002b0fba02378821b3fbb30d78412beb03 /sys-utils/renice.c
parentrenice: reorder functions to avoid need of function prototype (diff)
downloadkernel-qcow2-util-linux-6dcc066f3b2cad8b2bc6ed8d97da15555692ef8c.tar.gz
kernel-qcow2-util-linux-6dcc066f3b2cad8b2bc6ed8d97da15555692ef8c.tar.xz
kernel-qcow2-util-linux-6dcc066f3b2cad8b2bc6ed8d97da15555692ef8c.zip
rename: use usage and version print out macros
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/renice.c')
-rw-r--r--sys-utils/renice.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sys-utils/renice.c b/sys-utils/renice.c
index 5d643fb88..06056802b 100644
--- a/sys-utils/renice.c
+++ b/sys-utils/renice.c
@@ -50,23 +50,20 @@
static void __attribute__((__noreturn__)) usage(FILE *out)
{
- fputs(_("\nUsage:\n"), out);
+ fputs(USAGE_HEADER, out);
fprintf(out,
_(" %1$s [-n] <priority> [-p|--pid] <pid>...\n"
" %1$s [-n] <priority> -g|--pgrp <pgid>...\n"
" %1$s [-n] <priority> -u|--user <user>...\n"),
program_invocation_short_name);
-
- fputs(_("\nOptions:\n"), out);
+ fputs(USAGE_OPTIONS, out);
fputs(_(" -g, --pgrp <id> interpret argument as process group ID\n"
" -n, --priority <num> specify the nice increment value\n"
" -p, --pid <id> interpret argument as process ID (default)\n"
" -u, --user <name|id> interpret argument as username or user ID\n"
" -h, --help display help text and exit\n"
" -V, --version display version information and exit\n"), out);
-
- fputs(_("\nFor more information see renice(1).\n"), out);
-
+ fprintf(out, USAGE_MAN_TAIL("renice(1)"));
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
@@ -129,9 +126,8 @@ main(int argc, char **argv)
if (strcmp(*argv, "-v") == 0 ||
strcmp(*argv, "-V") == 0 ||
strcmp(*argv, "--version") == 0) {
- printf(_("%s from %s\n"),
- program_invocation_short_name, PACKAGE_STRING);
- exit(EXIT_SUCCESS);
+ printf(UTIL_LINUX_VERSION);
+ return EXIT_SUCCESS;
}
}