summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2010-02-11 23:18:37 +0100
committerJakob Bornecrantz <jakob@vmware.com>2010-02-11 23:18:37 +0100
commit0f2b02d72e36dc6390c09d6adba13e4101bf3df8 (patch)
treef24ae7c2459b571880be56886b12e1dea82e4608 /src
parentc4f5bf8ea45b80c2ac4a5eec65ff58f148fb2807 (diff)
Add modinfo for vmware_drv.so
Diffstat (limited to 'src')
-rw-r--r--src/vmwaremodule.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/vmwaremodule.c b/src/vmwaremodule.c
index 826310b..a311c53 100644
--- a/src/vmwaremodule.c
+++ b/src/vmwaremodule.c
@@ -36,9 +36,31 @@
#define VMWGFX_DRIVER_NAME "vmwgfx"
#define VMWLEGACY_DRIVER_NAME "vmwlegacy"
+#define VMW_STRING_INNER(s) #s
+#define VMW_STRING(str) VMW_STRING_INNER(str)
+
#define VMWARE_VERSION_MAJOR 10
#define VMWARE_VERSION_MINOR 16
#define VMWARE_VERSION_PATCH 9
+#define VMWARE_VERSION_STRING_MAJOR VMW_STRING(VMWARE_VERSION_MAJOR)
+#define VMWARE_VERSION_STRING_MINOR VMW_STRING(VMWARE_VERSION_MINOR)
+#define VMWARE_VERSION_STRING_PATCH VMW_STRING(VMWARE_VERSION_PATCH)
+
+#define VMWARE_DRIVER_VERSION \
+ (VMWARE_VERSION_MAJOR * 65536 + VMWARE_VERSION_MINOR * 256 + VMWARE_VERSION_PATCH)
+#define VMWARE_DRIVER_VERSION_STRING \
+ VMWARE_VERSION_STRING_MAJOR "." VMWARE_VERSION_STRING_MINOR \
+ "." VMWARE_VERSION_STRING_PATCH
+
+/*
+ * 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.
+ */
+#ifdef __GNUC__
+const char vmware_modinfo[] __attribute__((section(".modinfo"),unused)) =
+ "version=" VMWARE_DRIVER_VERSION_STRING ".0";
+#endif
static XF86ModuleVersionInfo vmware_version;
static MODULESETUPPROTO(vmware_setup);