1. 10 6月, 2016 3 次提交
    • D
      nodeinfo: remove FreeBSD specific code for getting memory · 3050a3f5
      Daniel P. Berrange 提交于
      The GNULIB physmem module already provides support for
      the FreeBSD platform, so there's no reason to re-implement
      FreeBSD portability code in libvirt. If there are bugs in
      the GNULIB code, we should fix GNULIB rather than workaround
      it in libvirt.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      3050a3f5
    • D
      nodeinfo: make nodeGetInfo() call nodeGetMemory for memory size · 912813de
      Daniel P. Berrange 提交于
      The nodeGetInfo() method currently has its own code for getting
      memory size in KB, that basically just re-invents what nodeGetMemory
      already does. Remove it and just call nodeGetMemory, converting its
      result from bytes to KB, allowing removal of more platform specific
      conditional code.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      912813de
    • D
      nodeinfo: remove sysfs_prefix from all methods · 08ea852c
      Daniel P. Berrange 提交于
      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: NDaniel P. Berrange <berrange@redhat.com>
      08ea852c
  2. 09 6月, 2016 37 次提交