]> xenbits.xensource.com Git - libvirt.git/commitdiff
vircgroup: drop @create from virCgroupNewDomainPartition
authorPavel Hrdina <phrdina@redhat.com>
Wed, 21 Oct 2020 23:43:57 +0000 (01:43 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 3 Nov 2020 20:26:32 +0000 (21:26 +0100)
All callers pass true.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/vircgroup.c
src/util/vircgrouppriv.h
tests/vircgrouptest.c

index 00967ea5fadf39f40a7c5b10e20bab8767acadfc..1e18b84b54224689a5feadfe4ae8a4f989dd4922 100644 (file)
@@ -969,7 +969,6 @@ int
 virCgroupNewDomainPartition(virCgroupPtr partition,
                             const char *driver,
                             const char *name,
-                            bool create,
                             virCgroupPtr *group)
 {
     g_autofree char *grpname = NULL;
@@ -993,7 +992,7 @@ virCgroupNewDomainPartition(virCgroupPtr partition,
      * a group for driver, is to avoid overhead to track
      * cumulative usage that we don't need.
      */
-    if (virCgroupMakeGroup(partition, newGroup, create,
+    if (virCgroupMakeGroup(partition, newGroup, true,
                            VIR_CGROUP_MEM_HIERACHY) < 0) {
         return -1;
     }
@@ -1278,7 +1277,6 @@ virCgroupNewMachineManual(const char *name,
     if (virCgroupNewDomainPartition(parent,
                                     drivername,
                                     name,
-                                    true,
                                     &newGroup) < 0)
         return -1;
 
@@ -2836,7 +2834,6 @@ int
 virCgroupNewDomainPartition(virCgroupPtr partition G_GNUC_UNUSED,
                             const char *driver G_GNUC_UNUSED,
                             const char *name G_GNUC_UNUSED,
-                            bool create G_GNUC_UNUSED,
                             virCgroupPtr *group G_GNUC_UNUSED)
 {
     virReportSystemError(ENXIO, "%s",
index 7248bc1d35aa16428b24d5dc181b3e53ee200bca..77e01519b0519f5916d9972c2d8716cca602eebe 100644 (file)
@@ -123,7 +123,6 @@ int virCgroupNewPartition(const char *path,
 int virCgroupNewDomainPartition(virCgroupPtr partition,
                                 const char *driver,
                                 const char *name,
-                                bool create,
                                 virCgroupPtr *group)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(5);
 
index 0dd5e3f0b46b1eb485c12e2f2f91bd0e59b42cd6..1baa71e61c70adb54a64b680dc2b06a8fc54eabb 100644 (file)
@@ -434,7 +434,7 @@ static int testCgroupNewForPartitionDomain(const void *args G_GNUC_UNUSED)
         return -1;
     }
 
-    if ((rv = virCgroupNewDomainPartition(partitioncgroup, "lxc", "foo", true, &domaincgroup)) != 0) {
+    if ((rv = virCgroupNewDomainPartition(partitioncgroup, "lxc", "foo", &domaincgroup)) != 0) {
         fprintf(stderr, "Cannot create LXC cgroup: %d\n", -rv);
         return -1;
     }
@@ -475,7 +475,7 @@ static int testCgroupNewForPartitionDomainEscaped(const void *args G_GNUC_UNUSED
         return -1;
     }
 
-    if ((rv = virCgroupNewDomainPartition(partitioncgroup3, "lxc", "cpu.foo", true, &domaincgroup)) != 0) {
+    if ((rv = virCgroupNewDomainPartition(partitioncgroup3, "lxc", "cpu.foo", &domaincgroup)) != 0) {
         fprintf(stderr, "Cannot create LXC cgroup: %d\n", -rv);
         return -1;
     }