|
|
c480ed |
From 7191b04edf95dd3180657ec45aec17c80dfdf083 Mon Sep 17 00:00:00 2001
|
|
|
c480ed |
Message-Id: <7191b04edf95dd3180657ec45aec17c80dfdf083@dist-git>
|
|
|
c480ed |
From: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c480ed |
Date: Mon, 1 Jul 2019 17:05:55 +0200
|
|
|
c480ed |
Subject: [PATCH] vircgroup: Remove pointless bool parameter
|
|
|
c480ed |
MIME-Version: 1.0
|
|
|
c480ed |
Content-Type: text/plain; charset=UTF-8
|
|
|
c480ed |
Content-Transfer-Encoding: 8bit
|
|
|
c480ed |
|
|
|
c480ed |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c480ed |
(cherry picked from commit 0490a74aa11a2d993c50da266b8c2234c5a447ca)
|
|
|
c480ed |
|
|
|
c480ed |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689297
|
|
|
c480ed |
|
|
|
c480ed |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c480ed |
Message-Id: <19e5a131d50721e94d43b37e139dda8dd9994df3.1561993099.git.phrdina@redhat.com>
|
|
|
c480ed |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
c480ed |
---
|
|
|
c480ed |
src/util/vircgroup.c | 11 ++++-------
|
|
|
c480ed |
1 file changed, 4 insertions(+), 7 deletions(-)
|
|
|
c480ed |
|
|
|
c480ed |
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
|
|
|
c480ed |
index 7d8bf3419a..9032bcbb63 100644
|
|
|
c480ed |
--- a/src/util/vircgroup.c
|
|
|
c480ed |
+++ b/src/util/vircgroup.c
|
|
|
c480ed |
@@ -251,7 +251,6 @@ static bool
|
|
|
c480ed |
virCgroupValidateMachineGroup(virCgroupPtr group,
|
|
|
c480ed |
const char *name,
|
|
|
c480ed |
const char *drivername,
|
|
|
c480ed |
- bool stripEmulatorSuffix,
|
|
|
c480ed |
const char *machinename)
|
|
|
c480ed |
{
|
|
|
c480ed |
size_t i;
|
|
|
c480ed |
@@ -303,10 +302,9 @@ virCgroupValidateMachineGroup(virCgroupPtr group,
|
|
|
c480ed |
if (!tmp)
|
|
|
c480ed |
return false;
|
|
|
c480ed |
|
|
|
c480ed |
- if (stripEmulatorSuffix &&
|
|
|
c480ed |
- (i == VIR_CGROUP_CONTROLLER_CPU ||
|
|
|
c480ed |
- i == VIR_CGROUP_CONTROLLER_CPUACCT ||
|
|
|
c480ed |
- i == VIR_CGROUP_CONTROLLER_CPUSET)) {
|
|
|
c480ed |
+ if (i == VIR_CGROUP_CONTROLLER_CPU ||
|
|
|
c480ed |
+ i == VIR_CGROUP_CONTROLLER_CPUACCT ||
|
|
|
c480ed |
+ i == VIR_CGROUP_CONTROLLER_CPUSET) {
|
|
|
c480ed |
if (STREQ(tmp, "/emulator"))
|
|
|
c480ed |
*tmp = '\0';
|
|
|
c480ed |
tmp = strrchr(group->controllers[i].placement, '/');
|
|
|
c480ed |
@@ -1486,8 +1484,7 @@ virCgroupNewDetectMachine(const char *name,
|
|
|
c480ed |
return -1;
|
|
|
c480ed |
}
|
|
|
c480ed |
|
|
|
c480ed |
- if (!virCgroupValidateMachineGroup(*group, name, drivername,
|
|
|
c480ed |
- true, machinename)) {
|
|
|
c480ed |
+ if (!virCgroupValidateMachineGroup(*group, name, drivername, machinename)) {
|
|
|
c480ed |
VIR_DEBUG("Failed to validate machine name for '%s' driver '%s'",
|
|
|
c480ed |
name, drivername);
|
|
|
c480ed |
virCgroupFree(group);
|
|
|
c480ed |
--
|
|
|
c480ed |
2.22.0
|
|
|
c480ed |
|