On 04/14/2016 11:22 AM, Daniel P. Berrange wrote:
Nearly all the methods in the nodeinfo file are given a
'const char *sysfs_prefix' parameter to override the
default sysfs path (/sys/devices/system). Every single
caller passes in NULL for this, except one use in the
unit tests. Furthermore this parameter is totally
Linux-specific, when the APIs are intended to be cross
platform portable.
This removes the sysfs_prefix parameter and instead gives
a new method linuxNodeInfoSetSysFSSystemPath for use by
the test suite.
For two of the methods this hardcodes use of the constant
SYSFS_SYSTEM_PATH, since the test suite does not need to
override the path for thos methods.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/bhyve/bhyve_capabilities.c | 2 +-
src/bhyve/bhyve_driver.c | 6 +--
src/libvirt_linux.syms | 1 +
src/lxc/lxc_conf.c | 2 +-
src/lxc/lxc_controller.c | 2 +-
src/lxc/lxc_driver.c | 6 +--
src/nodeinfo.c | 112 +++++++++++++++++++----------------------
src/nodeinfo.h | 16 +++---
src/nodeinfopriv.h | 5 +-
src/openvz/openvz_conf.c | 4 +-
src/openvz/openvz_driver.c | 6 +--
src/phyp/phyp_driver.c | 2 +-
src/qemu/qemu_capabilities.c | 4 +-
src/qemu/qemu_driver.c | 12 ++---
src/qemu/qemu_process.c | 2 +-
src/uml/uml_conf.c | 2 +-
src/uml/uml_driver.c | 6 +--
src/util/vircgroup.c | 2 +-
src/vbox/vbox_common.c | 4 +-
src/vmware/vmware_conf.c | 2 +-
src/vz/vz_driver.c | 10 ++--
src/vz/vz_sdk.c | 2 +-
tests/nodeinfotest.c | 9 ++--
tests/vircgrouptest.c | 4 +-
24 files changed, 108 insertions(+), 115 deletions(-)
Oh - I remember this code ...
ACK
John