Blob Blame History Raw
From 7191b04edf95dd3180657ec45aec17c80dfdf083 Mon Sep 17 00:00:00 2001
Message-Id: <7191b04edf95dd3180657ec45aec17c80dfdf083@dist-git>
From: Pavel Hrdina <phrdina@redhat.com>
Date: Mon, 1 Jul 2019 17:05:55 +0200
Subject: [PATCH] vircgroup: Remove pointless bool parameter
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit 0490a74aa11a2d993c50da266b8c2234c5a447ca)

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689297

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Message-Id: <19e5a131d50721e94d43b37e139dda8dd9994df3.1561993099.git.phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
---
 src/util/vircgroup.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 7d8bf3419a..9032bcbb63 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -251,7 +251,6 @@ static bool
 virCgroupValidateMachineGroup(virCgroupPtr group,
                               const char *name,
                               const char *drivername,
-                              bool stripEmulatorSuffix,
                               const char *machinename)
 {
     size_t i;
@@ -303,10 +302,9 @@ virCgroupValidateMachineGroup(virCgroupPtr group,
         if (!tmp)
             return false;
 
-        if (stripEmulatorSuffix &&
-            (i == VIR_CGROUP_CONTROLLER_CPU ||
-             i == VIR_CGROUP_CONTROLLER_CPUACCT ||
-             i == VIR_CGROUP_CONTROLLER_CPUSET)) {
+        if (i == VIR_CGROUP_CONTROLLER_CPU ||
+            i == VIR_CGROUP_CONTROLLER_CPUACCT ||
+            i == VIR_CGROUP_CONTROLLER_CPUSET) {
             if (STREQ(tmp, "/emulator"))
                 *tmp = '\0';
             tmp = strrchr(group->controllers[i].placement, '/');
@@ -1486,8 +1484,7 @@ virCgroupNewDetectMachine(const char *name,
         return -1;
     }
 
-    if (!virCgroupValidateMachineGroup(*group, name, drivername,
-                                       true, machinename)) {
+    if (!virCgroupValidateMachineGroup(*group, name, drivername, machinename)) {
         VIR_DEBUG("Failed to validate machine name for '%s' driver '%s'",
                   name, drivername);
         virCgroupFree(group);
-- 
2.22.0