[PATCH v3 1/3] vircgroup: remove VIR_CGROUP_SUPPORTED

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

 



tests/vircgrouptest.c uses #ifdef __linux__ for a long time and no
failure was reported so far so it's safe to assume that __linux__ is
good enough to guard cgroup code.

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/util/vircgroup.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 23957c82c7..7700a9f7a7 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -66,11 +66,6 @@ VIR_LOG_INIT("util.cgroup");
 #define CGROUP_NB_TOTAL_CPU_STAT_PARAM 3
 #define CGROUP_NB_PER_CPU_STAT_PARAM   1
 
-#if defined(__linux__) && defined(HAVE_GETMNTENT_R) && \
-    defined(_DIRENT_HAVE_D_TYPE) && defined(_SC_CLK_TCK)
-# define VIR_CGROUP_SUPPORTED
-#endif
-
 VIR_ENUM_IMPL(virCgroupController, VIR_CGROUP_CONTROLLER_LAST,
               "cpu", "cpuacct", "cpuset", "memory", "devices",
               "freezer", "blkio", "net_cls", "perf_event",
@@ -115,7 +110,7 @@ virCgroupGetDevicePermsString(int perms)
 }
 
 
-#ifdef VIR_CGROUP_SUPPORTED
+#ifdef __linux__
 bool
 virCgroupAvailable(void)
 {
@@ -2639,7 +2634,7 @@ virCgroupControllerAvailable(int controller)
     return ret;
 }
 
-#else /* !VIR_CGROUP_SUPPORTED */
+#else /* !__linux__ */
 
 bool
 virCgroupAvailable(void)
@@ -3400,7 +3395,7 @@ virCgroupControllerAvailable(int controller ATTRIBUTE_UNUSED)
 {
     return false;
 }
-#endif /* !VIR_CGROUP_SUPPORTED */
+#endif /* !__linux__ */
 
 
 int
-- 
2.17.1

--
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