[libvirt] [PATCH] vircgroup: Fix build issue on mingw

Commit id 'ba1dfc5' added virCgroupSetCpusetMemoryMigrate and virCgroupGetCpusetMemoryMigrate, but did not add the corresponding entry points into the "#else /* !VIR_CGROUP_SUPPORTED */" section Signed-off-by: John Ferlan <jferlan@redhat.com> --- Not pushing as a build break since I'm not 100% it fixes the issue eblake mentions in his review of a recent cgroup series. src/util/vircgroup.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 0a2e729..093a146 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -4420,6 +4420,26 @@ virCgroupGetCpusetMems(virCgroupPtr group ATTRIBUTE_UNUSED, int +virCgroupSetCpusetMemoryMigrate(virCgroupPtr group ATTRIBUTE_UNUSED, + bool migrate ATTRIBUTE_UNUSED) +{ + virReportSystemError(ENOSYS, "%s", + _("Control groups not supported on this platform")); + return -1; +} + + +int +virCgroupGetCpusetMemoryMigrate(virCgroupPtr group ATTRIBUTE_UNUSED, + bool *migrate ATTRIBUTE_UNUSED) +{ + virReportSystemError(ENOSYS, "%s", + _("Control groups not supported on this platform")); + return -1; +} + + +int virCgroupSetCpusetCpus(virCgroupPtr group ATTRIBUTE_UNUSED, const char *cpus ATTRIBUTE_UNUSED) { -- 2.1.0

Commit id '2dbfa716' exposed virCgroupDetectMountsFromFile, but did not add the corresponding entry in the "#else /* !VIR_CGROUP_SUPPORTED */" section of the module. Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/util/vircgroup.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 093a146..7c59428 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -4021,6 +4021,17 @@ virCgroupAvailable(void) int +virCgroupDetectMountsFromFile(virCgroupPtr group ATTRIBUTE_UNUSED, + const char *path ATTRIBUTE_UNUSED, + bool checkLinks ATTRIBUTE_UNUSED) +{ + virReportSystemError(ENXIO, "%s", + _("Control groups not supported on this platform")); + return -1; +} + + +int virCgroupNewPartition(const char *path ATTRIBUTE_UNUSED, bool create ATTRIBUTE_UNUSED, int controllers ATTRIBUTE_UNUSED, -- 2.1.0

On 03/27/2015 10:41 AM, John Ferlan wrote:
Commit id '2dbfa716' exposed virCgroupDetectMountsFromFile, but did not add the corresponding entry in the "#else /* !VIR_CGROUP_SUPPORTED */" section of the module.
Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/util/vircgroup.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
ACK for helping the issue. These two patches together fixed the build for me. Okay to leave them as separate patches, since they fix problems introduced by different commits (and therefore might be backported at different times). But with this fixed, another build issue surfaces: ../../tools/virsh-domain-monitor.c: In function 'cmdDomIfAddr': ../../tools/virsh-domain-monitor.c:2233:17: error: expected identifier or '(' before 'struct' const char *interface = NULL; ^ 'interface' is one of those black-listed terms that we should never use in our code (because mingw headers pollute the namespace); we use 'iface' elsewhere. We should really add a syntax check to avoid re-introducing it all the time... -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Eric Blake
-
John Ferlan