summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2010-11-04 09:09:52 +0100
committerThomas Hellstrom <thellstrom@vmware.com>2010-11-04 09:12:14 +0100
commite5987a4e60d4e05159c7cc4a24cee6daed36c770 (patch)
treeece677a02f2f4fa1d917855280140d8977484381
parent3ef519e91fb85261834a3f4ff6982c0a9f86d616 (diff)
Make the modinfo sring contain an optional subpatch number
The idea is that the build system assigns this number if needed. As an example it might be the commit number since the last version tag. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
-rw-r--r--src/vmmouse.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vmmouse.c b/src/vmmouse.c
index e70d95e..ad014ec 100644
--- a/src/vmmouse.c
+++ b/src/vmmouse.c
@@ -110,12 +110,18 @@
/*
* 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.
+ * As the driver's version is only {major, minor, patchlevel},
+ * The fourth digit may describe the commit number relative to the
+ * last version tag as output from `git describe`
*/
#ifdef __GNUC__
+#ifdef VMW_SUBPATCH
+const char vm_mouse_version[] __attribute__((section(".modinfo"),unused)) =
+ "version=" VMMOUSE_DRIVER_VERSION_STRING "." VMW_STRING(VMW_SUBPATCH);
+#else
const char vm_mouse_version[] __attribute__((section(".modinfo"),unused)) =
"version=" VMMOUSE_DRIVER_VERSION_STRING ".0";
+#endif /*VMW_SUBPATCH*/
#endif