[PATCH] util: Define SYSFS_SYSTEM_PATH unconditionally in virhostcpu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The code is already prepared to handle the non-existence of it.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
Pushed under the build-breaker rule.

 src/util/virhostcpu.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index 317c52410a0b..aa9cfeac203c 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -188,10 +188,15 @@ virHostCPUGetStatsFreeBSD(int cpuNum,

 #endif /* __FreeBSD__ */

+/*
+ * Even though it doesn't exist on some platforms, the code is adjusted for
+ * graceful handling of that so that we don't have too many stub functions.
+ */
+#define SYSFS_SYSTEM_PATH "/sys/devices/system"
+
 #ifdef __linux__
 # define CPUINFO_PATH "/proc/cpuinfo"
 # define PROCSTAT_PATH "/proc/stat"
-# define SYSFS_SYSTEM_PATH "/sys/devices/system"
 # define VIR_HOST_CPU_MASK_LEN 1024

 # define LINUX_NB_CPU_STATS 4
--
2.12.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux