From: Benno Schulenberg Date: Mon, 6 Feb 2012 15:37:16 +0000 (+0100) Subject: textual: standardize reporting of program name plus package version X-Git-Tag: v2.23-rc1~304 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=217615e8ed6041fae5e877d76b91895bfad6d96d;p=thirdparty%2Futil-linux.git textual: standardize reporting of program name plus package version Signed-off-by: Benno Schulenberg --- diff --git a/disk-utils/blockdev.c b/disk-utils/blockdev.c index a9e8833ffa..eb347b79b5 100644 --- a/disk-utils/blockdev.c +++ b/disk-utils/blockdev.c @@ -229,7 +229,7 @@ int main(int argc, char **argv) /* -V not together with commands */ if (!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version")) { - printf(_("%s (%s)\n"), program_invocation_short_name, + printf(_("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING); return EXIT_SUCCESS; } diff --git a/disk-utils/elvtune.c b/disk-utils/elvtune.c index 9f7fbf327f..6aa01a2909 100644 --- a/disk-utils/elvtune.c +++ b/disk-utils/elvtune.c @@ -64,7 +64,8 @@ usage(void) { static void version(void) { - fprintf(stderr, "elvtune (%s)\n", PACKAGE_STRING); + fprintf(stderr, _("%s from %s\n"), + program_invocation_short_name, PACKAGE_STRING); } int diff --git a/disk-utils/mkfs.c b/disk-utils/mkfs.c index dc2d2fdd9e..1929a9072a 100644 --- a/disk-utils/mkfs.c +++ b/disk-utils/mkfs.c @@ -57,7 +57,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out) static void __attribute__ ((__noreturn__)) print_version(void) { - printf(_("%s (%s)\n"), + printf(_("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING); exit(EXIT_SUCCESS); } @@ -128,7 +128,8 @@ int main(int argc, char **argv) argv[--optind] = progname; if (verbose) { - printf(_("mkfs (%s)\n"), PACKAGE_STRING); + printf(_("%s from %s\n"), + program_invocation_short_name, PACKAGE_STRING); i = optind; while (argv[i]) printf("%s ", argv[i++]); diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c index 856eba00df..52e280f765 100644 --- a/misc-utils/blkid.c +++ b/misc-utils/blkid.c @@ -56,8 +56,9 @@ int raw_chars; static void print_version(FILE *out) { - fprintf(out, "%s from %s (libblkid %s, %s)\n", - progname, PACKAGE_STRING, LIBBLKID_VERSION, LIBBLKID_DATE); + fprintf(out, "%s from %s (libblkid %s, %s)\n", + program_invocation_short_name, PACKAGE_STRING, + LIBBLKID_VERSION, LIBBLKID_DATE); } static void usage(int error) diff --git a/mount-deprecated/umount.c b/mount-deprecated/umount.c index 3820c67f2a..da3b05b819 100644 --- a/mount-deprecated/umount.c +++ b/mount-deprecated/umount.c @@ -811,7 +811,8 @@ main (int argc, char *argv[]) { ++verbose; break; case 'V': /* version */ - printf ("umount (%s)\n", PACKAGE_STRING); + printf(_("%s from %s\n"), + program_invocation_short_name, PACKAGE_STRING); exit (0); case 't': /* specify file system type */ types = optarg; diff --git a/sys-utils/flock.c b/sys-utils/flock.c index 50435e0ecb..11c44b6b66 100644 --- a/sys-utils/flock.c +++ b/sys-utils/flock.c @@ -206,7 +206,8 @@ int main(int argc, char *argv[]) _("invalid exit code")); break; case 'V': - printf("flock (%s)\n", PACKAGE_STRING); + printf(_("%s from %s\n"), + program_invocation_short_name, PACKAGE_STRING); exit(EX_OK); default: /* optopt will be set if this was an unrecognized diff --git a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c index 7a757ad660..0edf7dc814 100644 --- a/sys-utils/rtcwake.c +++ b/sys-utils/rtcwake.c @@ -461,7 +461,8 @@ int main(int argc, char **argv) break; case 'V': - printf(UTIL_LINUX_VERSION); + printf(_("%s from %s\n"), + program_invocation_short_name, PACKAGE_STRING); exit(EXIT_SUCCESS); case 'h': diff --git a/sys-utils/tunelp.c b/sys-utils/tunelp.c index 7313737867..0486614502 100644 --- a/sys-utils/tunelp.c +++ b/sys-utils/tunelp.c @@ -246,7 +246,8 @@ int main(int argc, char **argv) #endif case 'v': case 'V': - printf(UTIL_LINUX_VERSION); + printf(_("%s from %s\n"), + program_invocation_short_name, PACKAGE_STRING); return EXIT_SUCCESS; default: print_usage(stderr); diff --git a/text-utils/more.c b/text-utils/more.c index c45b967ad6..2c97950c60 100644 --- a/text-utils/more.c +++ b/text-utils/more.c @@ -568,7 +568,8 @@ void argscan(char *s) case '\t': break; case 'V': - printf(_("more (%s)\n"), PACKAGE_STRING); + printf(_("%s from %s\n"), + program_invocation_short_name, PACKAGE_STRING); exit(EXIT_SUCCESS); break; default: