[libvirt] [PATCH 10/17] vircgroup: Remove pointless bool parameter

Pavel Hrdina phrdina at redhat.com
Thu Aug 9 13:44:05 UTC 2018


Signed-off-by: Pavel Hrdina <phrdina at 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 280d781f41..6ffa1e9c58 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.17.1




More information about the libvir-list mailing list