]> err.no Git - util-linux/commitdiff
mount: add more details to the --version output
authorKarel Zak <kzak@redhat.com>
Tue, 8 Jan 2008 12:08:32 +0000 (13:08 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 14 Jan 2008 10:43:34 +0000 (11:43 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
mount/mount.c

index 0688c57ff58f78dcad86b3707021b1175f684ee6..41fe71d61e54a11624812e12e8c3ccb11f7cfb78 100644 (file)
@@ -1819,6 +1819,22 @@ getfs(const char *spec, const char *uuid, const char *label)
        return mc;
 }
 
+
+static void
+print_version(int rc) {
+       printf( "mount from %s (with "
+#ifdef HAVE_LIBBLKID
+               "libblkid"
+#else
+               "libvolume_id"
+#endif
+#ifdef HAVE_LIBSELINUX
+               " and selinux"
+#endif
+               " support)\n", PACKAGE_STRING);
+       exit(rc);
+}
+
 int
 main(int argc, char *argv[]) {
        int c, result = 0, specseen;
@@ -1908,8 +1924,8 @@ main(int argc, char *argv[]) {
                        ++verbose;
                        break;
                case 'V':               /* version */
-                       printf ("mount (%s)\n", PACKAGE_STRING);
-                       exit (0);
+                       print_version(EXIT_SUCCESS);
+                       break;
                case 'w':               /* mount read/write */
                        readwrite = 1;
                        readonly = 0;