diff options
author | Richard Jones <rjones@redhat.com> | 2010-08-27 13:38:49 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-08-27 13:38:49 +0100 |
commit | 4932fdca3ca1e9002164a1c0b73876f32739d34d (patch) | |
tree | e50fccae719c568353e06da31d2c5dcd9c0d4309 /fuse | |
parent | 1c523760d32b9e4db8441fc11d59539e213635b5 (diff) | |
download | libguestfs-4932fdca3ca1e9002164a1c0b73876f32739d34d.tar.gz libguestfs-4932fdca3ca1e9002164a1c0b73876f32739d34d.tar.xz libguestfs-4932fdca3ca1e9002164a1c0b73876f32739d34d.zip |
build: Don't add version extra string to the version number.
If this string was non-empty, then it broke a lot of things because
autoconf and other parts of the build system were expecting this
string to contain a simple MAJOR.MINOR.RELEASE version number.
This requires changes to guestfish and guestmount so they use the
guestfs_version API to fetch the version from the library. (The
Perl tools were already doing it this way). In a way this is more
accurate, because it's no longer hard-coded in the binary, but
fetched from the dynamically linked libguestfs.so.
Diffstat (limited to 'fuse')
-rw-r--r-- | fuse/guestmount.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fuse/guestmount.c b/fuse/guestmount.c index e1cb2d89..9b7e520a 100644 --- a/fuse/guestmount.c +++ b/fuse/guestmount.c @@ -29,6 +29,7 @@ #include <stdio.h> #include <stdlib.h> #include <stdint.h> +#include <inttypes.h> #include <string.h> #include <unistd.h> #include <getopt.h> @@ -1074,9 +1075,12 @@ main (int argc, char *argv[]) guestfs_set_verbose (g, verbose); break; - case 'V': - printf ("%s %s\n", program_name, PACKAGE_VERSION); + case 'V': { + struct guestfs_version *v = guestfs_version (g); + printf ("%s %"PRIi64".%"PRIi64".%"PRIi64"%s\n", program_name, + v->major, v->minor, v->release, v->extra); exit (EXIT_SUCCESS); + } case HELP_OPTION: usage (EXIT_SUCCESS); |