On Tue, Jan 08, 2008 at 12:37:16AM -0500, Mike Frysinger wrote: > Karel: perhaps we should include this information in the output of > `mount --version` ? Good idea, what about: ./mount --version mount from util-linux-ng 2.14 (with libblkid and selinux support) Karel diff --git a/mount/mount.c b/mount/mount.c index 0688c57..41fe71d 100644 --- a/mount/mount.c +++ b/mount/mount.c @@ -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; - To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html