diff options
author | Philip Langdale <philipl@fido2.homeip.net> | 2007-09-10 20:45:58 -0700 |
---|---|---|
committer | Philip Langdale <philipl@fido2.homeip.net> | 2007-09-10 20:45:58 -0700 |
commit | 0cd80f9869feef92261d0972f3d2d018a3dcfb18 (patch) | |
tree | 71d6b06b33288c3aa0c3d5e74bcc8e09f0378f4a | |
parent | 5a4e1fe50b1a38cfc489eff49f5a729bd726cd23 (diff) |
Ready 12.4.2 release.
To allow for easier detection of driver version by other VMware tools,
we are embedding the version in a .modinfo section so that the Linux
kernel 'modinfo' tool can be (ab)used to check it.
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/vmmouse.c | 23 |
2 files changed, 23 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index bf558be..2efe700 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ(2.57) AC_INIT([xf86-input-vmmouse], - 12.4.0, + 12.4.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xf86-input-vmmouse) diff --git a/src/vmmouse.c b/src/vmmouse.c index 2c2683b..af24848 100644 --- a/src/vmmouse.c +++ b/src/vmmouse.c @@ -77,11 +77,32 @@ #include "vmmouse_client.h" /* + * This is the only way I know to turn a #define of an integer constant into + * a constant string. + */ +#define VMW_INNERSTRINGIFY(s) #s +#define VMW_STRING(str) VMW_INNERSTRINGIFY(str) + +/* * Version constants */ #define VMMOUSE_MAJOR_VERSION 12 #define VMMOUSE_MINOR_VERSION 4 -#define VMMOUSE_PATCHLEVEL 0 +#define VMMOUSE_PATCHLEVEL 2 +#define VMMOUSE_DRIVER_VERSION \ + (VMMOUSE_MAJOR_VERSION * 65536 + VMMOUSE_MINOR_VERSION * 256 + VMMOUSE_PATCHLEVEL) +#define VMMOUSE_DRIVER_VERSION_STRING \ + VMW_STRING(VMMOUSE_MAJOR_VERSION) "." VMW_STRING(VMMOUSE_MINOR_VERSION) \ + "." VMW_STRING(VMMOUSE_PATCHLEVEL) + +/* + * Standard four digit version string expected by VMware Tools installer. + * As the driver's version is only {major, minor, patchlevel}, simply append an + * extra zero for the fourth digit. + */ +const char vm_version[] __attribute__((section(".modinfo"),unused)) = + "version=" VMMOUSE_DRIVER_VERSION_STRING ".0"; + /***************************************************************************** * static function header |