diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2010-09-16 10:08:12 +0200 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2010-09-16 10:18:24 +0200 |
commit | 083a663bbb186bfb854eda3b9f33d7fc24252ec5 (patch) | |
tree | d8706751f8337e6d62a7e9ebe28aee1d3142164d | |
parent | 5a2206c328caaed95daf91aff9220d3a51b492bd (diff) |
Make the modinfo string 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/vmware.c | 17 | ||||
-rw-r--r-- | src/vmwaremodule.c | 13 |
2 files changed, 23 insertions, 7 deletions
diff --git a/src/vmware.c b/src/vmware.c index ed31b02..8560b0e 100644 --- a/src/vmware.c +++ b/src/vmware.c @@ -101,12 +101,21 @@ static const char VMWAREBuildStr[] = "VMware Guest X Server " /* * 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__ -const char vmwlegacy_drv_modinfo[] __attribute__((section(".modinfo"),unused)) = - "version=" VMWARE_DRIVER_VERSION_STRING ".0"; +#ifdef VMW_SUBPATCH +const char vmwlegacy_drv_modinfo[] +__attribute__((section(".modinfo"),unused)) = + "version=" VMWARE_DRIVER_VERSION_STRING "." VMW_STRING(VMW_SUBPATCH); +#else +const char vmwlegacy_drv_modinfo[] +__attribute__((section(".modinfo"),unused)) = + "version=" VMWARE_DRIVER_VERSION_STRING ".0"; +#endif /*VMW_SUBPATCH*/ #endif static SymTabRec VMWAREChipsets[] = { diff --git a/src/vmwaremodule.c b/src/vmwaremodule.c index 392062f..2754879 100644 --- a/src/vmwaremodule.c +++ b/src/vmwaremodule.c @@ -62,12 +62,19 @@ /* * 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 vmware_drv_modinfo[] __attribute__((section(".modinfo"),unused)) = + "version=" VMWARE_DRIVER_VERSION_STRING "." VMW_STRING(VMW_SUBPATCH); +#else const char vmware_drv_modinfo[] __attribute__((section(".modinfo"),unused)) = - "version=" VMWARE_DRIVER_VERSION_STRING ".0"; + "version=" VMWARE_DRIVER_VERSION_STRING ".0"; +#endif /*VMW_SUBPATCH*/ #endif static XF86ModuleVersionInfo vmware_version; |