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