1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-04-01 20:05:19 +00:00

vircgroup: remove VIR_CGROUP_SUPPORTED

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.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2018-09-27 12:16:57 +02:00
parent b7ccd0757d
commit 0df6266988

View File

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