From: Sami Kerola Date: Fri, 5 Sep 2014 22:11:00 +0000 (+0100) Subject: rename: use usage and version print out macros X-Git-Tag: v2.26-rc1~448^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6dcc066f3b2cad8b2bc6ed8d97da15555692ef8c;p=thirdparty%2Futil-linux.git rename: use usage and version print out macros Signed-off-by: Sami Kerola --- diff --git a/sys-utils/renice.c b/sys-utils/renice.c index 5d643fb882..06056802b1 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; } }