]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Remove virDomainDiskSourceDefFormatSeclabel
authorPeter Krempa <pkrempa@redhat.com>
Wed, 7 Mar 2018 16:42:13 +0000 (17:42 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 14 Mar 2018 11:19:44 +0000 (12:19 +0100)
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@redhat.com>
src/conf/domain_conf.c

index ebe1172fd22a8c0d3eb7520d8814946c39988c0a..4aa66fe09c8e1a06cabf16d3cdf7065b37ac269b 100644 (file)
@@ -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