From 6dcc066f3b2cad8b2bc6ed8d97da15555692ef8c Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Fri, 5 Sep 2014 23:11:00 +0100 Subject: rename: use usage and version print out macros Signed-off-by: Sami Kerola --- sys-utils/renice.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'sys-utils/renice.c') 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] [-p|--pid] ...\n" " %1$s [-n] -g|--pgrp ...\n" " %1$s [-n] -u|--user ...\n"), program_invocation_short_name); - - fputs(_("\nOptions:\n"), out); + fputs(USAGE_OPTIONS, out); fputs(_(" -g, --pgrp interpret argument as process group ID\n" " -n, --priority specify the nice increment value\n" " -p, --pid interpret argument as process ID (default)\n" " -u, --user 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; } } -- cgit v1.2.3-55-g7522