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.
void
GuestInfo_FreeDiskInfo(GuestDiskInfo *di);
+void
+GuestInfo_StatProviderShutdown(void);
+
#endif /* _GUESTINFOINT_H_ */
gatherStatsTimeoutSource = NULL;
}
-#ifdef _WIN32
+#if !defined(__APPLE__)
GuestInfo_StatProviderShutdown();
+#endif
+
+#ifdef _WIN32
NetUtil_FreeIpHlpApiDll();
#endif
}
DynBuf_Destroy(&stats);
return TRUE;
}
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GuestInfo_StatProviderShutdown --
+ *
+ * Clean up the resource acquired by perfMonLinux.
+ * Nothing to do at the moment.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+GuestInfo_StatProviderShutdown(void)
+{
+ // Nothing to do here for now
+}