]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commit
Tools: GuestInfo: ESX: dynamically load libvmkmemstats.so
authorOliver Kurth <okurth@vmware.com>
Thu, 30 Nov 2017 23:17:27 +0000 (15:17 -0800)
committerOliver Kurth <okurth@vmware.com>
Thu, 30 Nov 2017 23:17:27 +0000 (15:17 -0800)
commit3e7058028ce4352c39dcc2d3a012aa32ed50c421
tree702c5725077126331c159a3e8584b4fa84506cfb
parent41196c78ae6bd330f2f595071fe86e1082d19a85
Tools: GuestInfo: ESX: dynamically load libvmkmemstats.so

The new version of the vmware tools will be installed on older version
of ESX.  But these older versions do not come with libvmkmemstats.so
and a dynamic linking error occurs.

This patch changes the code to deal with the case where the lib is not
available.  Instead of relying on the linker to dynamically link with
libvmkmemstats.so, g_module_open() is used to open the library, if
available, and gracefully handle any eventual errors.
Before the patch, the whole libguestinfo would stop working and after
the patch only the memory stats are unavailable.
open-vm-tools/services/plugins/guestInfo/guestInfoInt.h
open-vm-tools/services/plugins/guestInfo/guestInfoServer.c
open-vm-tools/services/plugins/guestInfo/perfMonLinux.c