]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
textual: standardize reporting of program name plus package version
authorBenno Schulenberg <bensberg@justemail.net>
Mon, 6 Feb 2012 15:37:16 +0000 (16:37 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 25 Jan 2013 10:47:29 +0000 (11:47 +0100)
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
disk-utils/blockdev.c
disk-utils/elvtune.c
disk-utils/mkfs.c
misc-utils/blkid.c
mount-deprecated/umount.c
sys-utils/flock.c
sys-utils/rtcwake.c
sys-utils/tunelp.c
text-utils/more.c

index a9e8833ffa3719ab8a5db001cfb4b48cce58d48c..eb347b79b53ea8fa67e7a8bfa1a758964f8d40f9 100644 (file)
@@ -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;
        }
index 9f7fbf327fe540861f6c3cdab784cf25562b1ab0..6aa01a2909776ff05fa5550d0928960dc6f9ccb0 100644 (file)
@@ -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
index dc2d2fdd9ed9fc7ada8038d148405bc2b5889311..1929a9072a34d1165239cc714a3bac9bb81150d2 100644 (file)
@@ -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++]);
index 856eba00dfc1f97b0b6411b97ac3356a5fa73913..52e280f76547aef96d761fc82386014861c3b2c5 100644 (file)
@@ -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)
index 3820c67f2a56fc3319bb9b44133c7155202ce7e9..da3b05b819266c649876e793a1cb83dbed102d34 100644 (file)
@@ -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;
index 50435e0ecb80fa0801cdc257d839f506d12c08e5..11c44b6b666a1be07a9c6bae8d0006622897e4be 100644 (file)
@@ -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
index 7a757ad6605e814c57cf6788a05cd45865264238..0edf7dc81442151af3b84d4ea3e97d186781a884 100644 (file)
@@ -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':
index 7313737867426a0f6282899da53d2247ead0e787..048661450256c7215841bef9aca059bf3b873d02 100644 (file)
@@ -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);
index c45b967ad6763b0d049949c78b57bb01fdd9375c..2c97950c603b3cfcdd7f40ffc9046b6c15dccee3 100644 (file)
@@ -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: