From: Sami Kerola Date: Sun, 28 Sep 2014 19:51:39 +0000 (+0100) Subject: textual: use version printing macro everywhere X-Git-Tag: v2.26-rc1~424 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f6277500833ece8ea34c65e4d23e1454e054141b;p=thirdparty%2Futil-linux.git textual: use version printing macro everywhere Only mount, umount, and blkid remains not using the macro because they are print also library references. Signed-off-by: Sami Kerola --- diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c index e07278ffb8..13e98b4b21 100644 --- a/disk-utils/cfdisk.c +++ b/disk-utils/cfdisk.c @@ -2065,8 +2065,7 @@ int main(int argc, char *argv[]) _("unsupported color mode")); break; case 'V': - printf(_("%s from %s\n"), program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); return EXIT_SUCCESS; case 'z': cf->zero_start = 1; diff --git a/disk-utils/mkfs.minix.c b/disk-utils/mkfs.minix.c index 2dafc869fd..81b7ae3378 100644 --- a/disk-utils/mkfs.minix.c +++ b/disk-utils/mkfs.minix.c @@ -665,7 +665,7 @@ int main(int argc, char ** argv) { if (argc == 2 && (!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version"))) { - printf(_("%s (%s)\n"), program_name, PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); exit(MKFS_EX_OK); } diff --git a/schedutils/chrt.c b/schedutils/chrt.c index fec26fd55e..df115aaf6a 100644 --- a/schedutils/chrt.c +++ b/schedutils/chrt.c @@ -261,8 +261,7 @@ int main(int argc, char **argv) verbose = 1; break; case 'V': - printf(_("%s from %s\n"), program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); return EXIT_SUCCESS; case 'h': ret = EXIT_SUCCESS; diff --git a/schedutils/taskset.c b/schedutils/taskset.c index 6ebca06364..4cda2ebe51 100644 --- a/schedutils/taskset.c +++ b/schedutils/taskset.c @@ -162,8 +162,7 @@ int main(int argc, char **argv) ts.use_list = 1; break; case 'V': - printf(_("%s from %s\n"), program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); return EXIT_SUCCESS; case 'h': usage(stdout); diff --git a/sys-utils/chcpu.c b/sys-utils/chcpu.c index ada0eaacca..aba9d6bc84 100644 --- a/sys-utils/chcpu.c +++ b/sys-utils/chcpu.c @@ -327,8 +327,7 @@ int main(int argc, char *argv[]) cmd = CMD_CPU_RESCAN; break; case 'V': - printf(_("%s from %s\n"), program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); return EXIT_SUCCESS; default: usage(stderr); diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c index 71e6632539..661aaa9d98 100644 --- a/sys-utils/dmesg.c +++ b/sys-utils/dmesg.c @@ -1332,8 +1332,7 @@ int main(int argc, char *argv[]) setbit(ctl.facilities, n); break; case 'V': - printf(_("%s from %s\n"), program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); return EXIT_SUCCESS; case 'w': ctl.follow = 1; diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index d0d422d2fe..9151d246ec 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -1543,7 +1543,7 @@ static int compare_clock (const bool utc, const bool local_opt) static void out_version(void) { - printf(_("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); } /* diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c index 8827424435..8ae702865b 100644 --- a/sys-utils/lscpu.c +++ b/sys-utils/lscpu.c @@ -1724,8 +1724,7 @@ int main(int argc, char *argv[]) mod->hex = 1; break; case 'V': - printf(_("%s from %s\n"), program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); return EXIT_SUCCESS; default: usage(stderr); diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c index 51ffb3c5a0..e1cd41d3a1 100644 --- a/sys-utils/rtcwake.c +++ b/sys-utils/rtcwake.c @@ -471,8 +471,7 @@ int main(int argc, char **argv) break; case 'V': - printf(_("%s from %s\n"), - program_invocation_short_name, PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); exit(EXIT_SUCCESS); case 'h': diff --git a/sys-utils/tunelp.c b/sys-utils/tunelp.c index 7beb8a721a..08cef5c374 100644 --- a/sys-utils/tunelp.c +++ b/sys-utils/tunelp.c @@ -255,8 +255,7 @@ int main(int argc, char **argv) #endif case 'v': case 'V': - printf(_("%s from %s\n"), - program_invocation_short_name, PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); return EXIT_SUCCESS; default: print_usage(stderr); diff --git a/term-utils/agetty.c b/term-utils/agetty.c index a7044f0ff2..5901228995 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -770,8 +770,7 @@ static void parse_args(int argc, char **argv, struct options *op) reload_agettys(); exit(EXIT_SUCCESS); case VERSION_OPTION: - printf(_("%s from %s\n"), program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); exit(EXIT_SUCCESS); case HELP_OPTION: usage(stdout); diff --git a/term-utils/script.c b/term-utils/script.c index b9f87384a0..ad16e74460 100644 --- a/term-utils/script.c +++ b/term-utils/script.c @@ -217,8 +217,7 @@ main(int argc, char **argv) { tflg = 1; break; case 'V': - printf(_("%s from %s\n"), program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); exit(EXIT_SUCCESS); break; case 'h': diff --git a/term-utils/scriptreplay.c b/term-utils/scriptreplay.c index ecea592e00..8e0cb97192 100644 --- a/term-utils/scriptreplay.c +++ b/term-utils/scriptreplay.c @@ -174,8 +174,7 @@ main(int argc, char *argv[]) maxdelay = getnum(optarg); break; case 'V': - printf(_("%s from %s\n"), program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); exit(EXIT_SUCCESS); case 'h': usage(stdout); diff --git a/term-utils/write.c b/term-utils/write.c index 146f4ba5e4..4d217c4a56 100644 --- a/term-utils/write.c +++ b/term-utils/write.c @@ -110,9 +110,7 @@ int main(int argc, char **argv) while ((c = getopt_long(argc, argv, "Vh", longopts, NULL)) != -1) switch (c) { case 'V': - printf(_("%s from %s\n"), - program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); return EXIT_SUCCESS; case 'h': usage(stdout); diff --git a/text-utils/col.c b/text-utils/col.c index 997f87b913..9b2f570caf 100644 --- a/text-utils/col.c +++ b/text-utils/col.c @@ -214,8 +214,7 @@ int main(int argc, char **argv) compress_spaces = 0; break; case 'V': - printf(_("%s from %s\n"), program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); return EXIT_SUCCESS; case 'H': usage(stdout); diff --git a/text-utils/colcrt.c b/text-utils/colcrt.c index 6c7f6361d0..a5d597701e 100644 --- a/text-utils/colcrt.c +++ b/text-utils/colcrt.c @@ -115,9 +115,7 @@ int main(int argc, char **argv) { printall = 1; break; case 'V': - printf(_("%s from %s\n"), - program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); return EXIT_SUCCESS; case 'h': usage(stdout); diff --git a/text-utils/colrm.c b/text-utils/colrm.c index 454085e703..111033df79 100644 --- a/text-utils/colrm.c +++ b/text-utils/colrm.c @@ -171,9 +171,7 @@ int main(int argc, char **argv) NULL)) != -1) switch (opt) { case 'V': - printf(_("%s from %s\n"), - program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); return EXIT_SUCCESS; case 'h': usage(stdout); diff --git a/text-utils/column.c b/text-utils/column.c index 0ee5a9e894..e583dbafb9 100644 --- a/text-utils/column.c +++ b/text-utils/column.c @@ -149,9 +149,8 @@ int main(int argc, char **argv) usage(EXIT_SUCCESS); break; case 'V': - printf(_("%s from %s\n"), program_invocation_short_name, - PACKAGE_STRING); - return EXIT_SUCCESS; + printf(UTIL_LINUX_VERSION); + return EXIT_SUCCESS; case 'c': termwidth = strtou32_or_err(optarg, _("invalid columns argument")); break; diff --git a/text-utils/rev.c b/text-utils/rev.c index f1341cb3d2..a661f0a434 100644 --- a/text-utils/rev.c +++ b/text-utils/rev.c @@ -121,8 +121,7 @@ int main(int argc, char *argv[]) while ((ch = getopt_long(argc, argv, "Vh", longopts, NULL)) != -1) switch(ch) { case 'V': - printf(_("%s from %s\n"), program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); exit(EXIT_SUCCESS); case 'h': usage(stdout); diff --git a/text-utils/tailf.c b/text-utils/tailf.c index d2366a6a00..94f999ea83 100644 --- a/text-utils/tailf.c +++ b/text-utils/tailf.c @@ -261,8 +261,7 @@ int main(int argc, char **argv) _("failed to parse number of lines")); break; case 'V': - printf(_("%s from %s\n"), program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); exit(EXIT_SUCCESS); case 'h': usage(stdout); diff --git a/text-utils/ul.c b/text-utils/ul.c index b3b3dc354c..054f7b90ab 100644 --- a/text-utils/ul.c +++ b/text-utils/ul.c @@ -193,8 +193,7 @@ int main(int argc, char **argv) iflag = 1; break; case 'V': - printf(_("%s from %s\n"), program_invocation_short_name, - PACKAGE_STRING); + printf(UTIL_LINUX_VERSION); return EXIT_SUCCESS; case 'h': usage(stdout);