summaryrefslogtreecommitdiff
path: root/src/vmmouse.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@fido2.homeip.net>2007-09-10 20:45:58 -0700
committerPhilip Langdale <philipl@fido2.homeip.net>2007-09-10 20:45:58 -0700
commit0cd80f9869feef92261d0972f3d2d018a3dcfb18 (patch)
tree71d6b06b33288c3aa0c3d5e74bcc8e09f0378f4a /src/vmmouse.c
parent5a4e1fe50b1a38cfc489eff49f5a729bd726cd23 (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.
Diffstat (limited to 'src/vmmouse.c')
-rw-r--r--src/vmmouse.c23
1 files changed, 22 insertions, 1 deletions
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