Pablo Greco 40546a
From 7191b04edf95dd3180657ec45aec17c80dfdf083 Mon Sep 17 00:00:00 2001
Pablo Greco 40546a
Message-Id: <7191b04edf95dd3180657ec45aec17c80dfdf083@dist-git>
Pablo Greco 40546a
From: Pavel Hrdina <phrdina@redhat.com>
Pablo Greco 40546a
Date: Mon, 1 Jul 2019 17:05:55 +0200
Pablo Greco 40546a
Subject: [PATCH] vircgroup: Remove pointless bool parameter
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
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Pablo Greco 40546a
(cherry picked from commit 0490a74aa11a2d993c50da266b8c2234c5a447ca)
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: <19e5a131d50721e94d43b37e139dda8dd9994df3.1561993099.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, 4 insertions(+), 7 deletions(-)
Pablo Greco 40546a
Pablo Greco 40546a
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
Pablo Greco 40546a
index 7d8bf3419a..9032bcbb63 100644
Pablo Greco 40546a
--- a/src/util/vircgroup.c
Pablo Greco 40546a
+++ b/src/util/vircgroup.c
Pablo Greco 40546a
@@ -251,7 +251,6 @@ static bool
Pablo Greco 40546a
 virCgroupValidateMachineGroup(virCgroupPtr group,
Pablo Greco 40546a
                               const char *name,
Pablo Greco 40546a
                               const char *drivername,
Pablo Greco 40546a
-                              bool stripEmulatorSuffix,
Pablo Greco 40546a
                               const char *machinename)
Pablo Greco 40546a
 {
Pablo Greco 40546a
     size_t i;
Pablo Greco 40546a
@@ -303,10 +302,9 @@ virCgroupValidateMachineGroup(virCgroupPtr group,
Pablo Greco 40546a
         if (!tmp)
Pablo Greco 40546a
             return false;
Pablo Greco 40546a
 
Pablo Greco 40546a
-        if (stripEmulatorSuffix &&
Pablo Greco 40546a
-            (i == VIR_CGROUP_CONTROLLER_CPU ||
Pablo Greco 40546a
-             i == VIR_CGROUP_CONTROLLER_CPUACCT ||
Pablo Greco 40546a
-             i == VIR_CGROUP_CONTROLLER_CPUSET)) {
Pablo Greco 40546a
+        if (i == VIR_CGROUP_CONTROLLER_CPU ||
Pablo Greco 40546a
+            i == VIR_CGROUP_CONTROLLER_CPUACCT ||
Pablo Greco 40546a
+            i == VIR_CGROUP_CONTROLLER_CPUSET) {
Pablo Greco 40546a
             if (STREQ(tmp, "/emulator"))
Pablo Greco 40546a
                 *tmp = '\0';
Pablo Greco 40546a
             tmp = strrchr(group->controllers[i].placement, '/');
Pablo Greco 40546a
@@ -1486,8 +1484,7 @@ virCgroupNewDetectMachine(const char *name,
Pablo Greco 40546a
         return -1;
Pablo Greco 40546a
     }
Pablo Greco 40546a
 
Pablo Greco 40546a
-    if (!virCgroupValidateMachineGroup(*group, name, drivername,
Pablo Greco 40546a
-                                       true, machinename)) {
Pablo Greco 40546a
+    if (!virCgroupValidateMachineGroup(*group, name, drivername, machinename)) {
Pablo Greco 40546a
         VIR_DEBUG("Failed to validate machine name for '%s' driver '%s'",
Pablo Greco 40546a
                   name, drivername);
Pablo Greco 40546a
         virCgroupFree(group);
Pablo Greco 40546a
-- 
Pablo Greco 40546a
2.22.0
Pablo Greco 40546a