[PATCH 03/10] conf: Remove virDomainDiskSourceDefFormatSeclabel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The wrapper functionality can be moved to the only user
virDomainDiskSourceFormatInternal. Also removes comment which does not
reflect the truth any more.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 31 +++++++------------------------
 1 file changed, 7 insertions(+), 24 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index ebe1172fd2..4aa66fe09c 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -22704,33 +22704,16 @@ virDomainDiskBlockIoDefFormat(virBufferPtr buf,
 }


-/* virDomainSourceDefFormatSeclabel:
- *
- * This function automatically closes the <source> element and formats any
- * possible seclabels.
- */
-static void
-virDomainDiskSourceDefFormatSeclabel(virBufferPtr buf,
-                                     size_t nseclabels,
-                                     virSecurityDeviceLabelDefPtr *seclabels,
-                                     unsigned int flags,
-                                     bool skipSeclables)
-{
-    size_t n;
-
-    if (nseclabels && !skipSeclables) {
-        for (n = 0; n < nseclabels; n++)
-            virSecurityDeviceLabelDefFormat(buf, seclabels[n], flags);
-    }
-}
-
 static void
 virDomainSourceDefFormatSeclabel(virBufferPtr buf,
                                  size_t nseclabels,
                                  virSecurityDeviceLabelDefPtr *seclabels,
                                  unsigned int flags)
 {
-    virDomainDiskSourceDefFormatSeclabel(buf, nseclabels, seclabels, flags, false);
+    size_t n;
+
+    for (n = 0; n < nseclabels; n++)
+        virSecurityDeviceLabelDefFormat(buf, seclabels[n], flags);
 }


@@ -22875,9 +22858,9 @@ virDomainDiskSourceFormatInternal(virBufferPtr buf,
     }

     if (src->type != VIR_STORAGE_TYPE_NETWORK) {
-        virDomainDiskSourceDefFormatSeclabel(&childBuf, src->nseclabels,
-                                             src->seclabels, flags,
-                                             skipSeclabels);
+        if (!skipSeclabels)
+            virDomainSourceDefFormatSeclabel(&childBuf, src->nseclabels,
+                                             src->seclabels, flags);
     }

     /* Storage Source formatting will not carry through the blunder
-- 
2.16.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux