|
Pablo Greco |
40546a |
From 2a09df456c5cceabdd6d6eee167061a74d7de9ea Mon Sep 17 00:00:00 2001
|
|
Pablo Greco |
40546a |
Message-Id: <2a09df456c5cceabdd6d6eee167061a74d7de9ea@dist-git>
|
|
Pablo Greco |
40546a |
From: Pavel Hrdina <phrdina@redhat.com>
|
|
Pablo Greco |
40546a |
Date: Mon, 1 Jul 2019 17:07:08 +0200
|
|
Pablo Greco |
40546a |
Subject: [PATCH] vircgroup: remove VIR_CGROUP_SUPPORTED
|
|
Pablo Greco |
40546a |
MIME-Version: 1.0
|
|
Pablo Greco |
40546a |
Content-Type: text/plain; charset=UTF-8
|
|
Pablo Greco |
40546a |
Content-Transfer-Encoding: 8bit
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
tests/vircgrouptest.c uses #ifdef __linux__ for a long time and no
|
|
Pablo Greco |
40546a |
failure was reported so far so it's safe to assume that __linux__ is
|
|
Pablo Greco |
40546a |
good enough to guard cgroup code.
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
Pablo Greco |
40546a |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
Pablo Greco |
40546a |
(cherry picked from commit 0df626698865e5158192a9090dfe4f76c2e44fc5)
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689297
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
Pablo Greco |
40546a |
Message-Id: <aa849f9f6c3bd44f7167a6ce08f16c4a0b7da72b.1561993100.git.phrdina@redhat.com>
|
|
Pablo Greco |
40546a |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
Pablo Greco |
40546a |
---
|
|
Pablo Greco |
40546a |
src/util/vircgroup.c | 11 +++--------
|
|
Pablo Greco |
40546a |
1 file changed, 3 insertions(+), 8 deletions(-)
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
|
|
Pablo Greco |
40546a |
index 349c388e0a..f1ecb1dbeb 100644
|
|
Pablo Greco |
40546a |
--- a/src/util/vircgroup.c
|
|
Pablo Greco |
40546a |
+++ b/src/util/vircgroup.c
|
|
Pablo Greco |
40546a |
@@ -70,11 +70,6 @@ VIR_LOG_INIT("util.cgroup");
|
|
Pablo Greco |
40546a |
#define CGROUP_NB_TOTAL_CPU_STAT_PARAM 3
|
|
Pablo Greco |
40546a |
#define CGROUP_NB_PER_CPU_STAT_PARAM 1
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
-#if defined(__linux__) && defined(HAVE_GETMNTENT_R) && \
|
|
Pablo Greco |
40546a |
- defined(_DIRENT_HAVE_D_TYPE) && defined(_SC_CLK_TCK)
|
|
Pablo Greco |
40546a |
-# define VIR_CGROUP_SUPPORTED
|
|
Pablo Greco |
40546a |
-#endif
|
|
Pablo Greco |
40546a |
-
|
|
Pablo Greco |
40546a |
VIR_ENUM_IMPL(virCgroupController, VIR_CGROUP_CONTROLLER_LAST,
|
|
Pablo Greco |
40546a |
"cpu", "cpuacct", "cpuset", "memory", "devices",
|
|
Pablo Greco |
40546a |
"freezer", "blkio", "net_cls", "perf_event",
|
|
Pablo Greco |
40546a |
@@ -119,7 +114,7 @@ virCgroupGetDevicePermsString(int perms)
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
-#ifdef VIR_CGROUP_SUPPORTED
|
|
Pablo Greco |
40546a |
+#ifdef __linux__
|
|
Pablo Greco |
40546a |
bool
|
|
Pablo Greco |
40546a |
virCgroupAvailable(void)
|
|
Pablo Greco |
40546a |
{
|
|
Pablo Greco |
40546a |
@@ -2643,7 +2638,7 @@ virCgroupControllerAvailable(int controller)
|
|
Pablo Greco |
40546a |
return ret;
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
-#else /* !VIR_CGROUP_SUPPORTED */
|
|
Pablo Greco |
40546a |
+#else /* !__linux__ */
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
bool
|
|
Pablo Greco |
40546a |
virCgroupAvailable(void)
|
|
Pablo Greco |
40546a |
@@ -3404,7 +3399,7 @@ virCgroupControllerAvailable(int controller ATTRIBUTE_UNUSED)
|
|
Pablo Greco |
40546a |
{
|
|
Pablo Greco |
40546a |
return false;
|
|
Pablo Greco |
40546a |
}
|
|
Pablo Greco |
40546a |
-#endif /* !VIR_CGROUP_SUPPORTED */
|
|
Pablo Greco |
40546a |
+#endif /* !__linux__ */
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
int
|
|
Pablo Greco |
40546a |
--
|
|
Pablo Greco |
40546a |
2.22.0
|
|
Pablo Greco |
40546a |
|