]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: Remove @seclabels from virDomainStorageSourceFormat
authorPeter Krempa <pkrempa@redhat.com>
Wed, 20 Mar 2019 10:18:44 +0000 (11:18 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 3 Apr 2019 09:58:09 +0000 (11:58 +0200)
All callers including transitive callers through
virDomainDiskSourceFormatInternal always pass true. Remove the argument.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_domain.c

index ed8e5c37d4eb017e52618ceb0d06d97b6518eefc..ce76d0677ca8ce1298f98a01aa579915fc74f10d 100644 (file)
@@ -23720,8 +23720,7 @@ int
 virDomainStorageSourceFormat(virBufferPtr attrBuf,
                              virBufferPtr childBuf,
                              virStorageSourcePtr src,
-                             unsigned int flags,
-                             bool seclabels)
+                             unsigned int flags)
 {
     switch ((virStorageType)src->type) {
     case VIR_STORAGE_TYPE_FILE:
@@ -23761,7 +23760,7 @@ virDomainStorageSourceFormat(virBufferPtr attrBuf,
         return -1;
     }
 
-    if (seclabels && src->type != VIR_STORAGE_TYPE_NETWORK)
+    if (src->type != VIR_STORAGE_TYPE_NETWORK)
         virDomainSourceDefFormatSeclabel(childBuf, src->nseclabels,
                                          src->seclabels, flags);
 
@@ -23793,7 +23792,6 @@ virDomainDiskSourceFormatInternal(virBufferPtr buf,
                                   virStorageSourcePtr src,
                                   int policy,
                                   unsigned int flags,
-                                  bool seclabels,
                                   bool attrIndex,
                                   virDomainXMLOptionPtr xmlopt)
 {
@@ -23803,8 +23801,7 @@ virDomainDiskSourceFormatInternal(virBufferPtr buf,
 
     virBufferSetChildIndent(&childBuf, buf);
 
-    if (virDomainStorageSourceFormat(&attrBuf, &childBuf, src, flags,
-                                     seclabels) < 0)
+    if (virDomainStorageSourceFormat(&attrBuf, &childBuf, src, flags) < 0)
         goto cleanup;
 
     if (policy && src->type != VIR_STORAGE_TYPE_NETWORK)
@@ -23834,7 +23831,7 @@ virDomainDiskSourceFormat(virBufferPtr buf,
                           unsigned int flags,
                           virDomainXMLOptionPtr xmlopt)
 {
-    return virDomainDiskSourceFormatInternal(buf, src, policy, flags, true,
+    return virDomainDiskSourceFormatInternal(buf, src, policy, flags,
                                              false, xmlopt);
 }
 
@@ -23876,7 +23873,7 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf,
     virBufferAdjustIndent(buf, 2);
 
     virBufferAsprintf(buf, "<format type='%s'/>\n", format);
-    if (virDomainDiskSourceFormatInternal(buf, backingStore, 0, flags, true,
+    if (virDomainDiskSourceFormatInternal(buf, backingStore, 0, flags,
                                           false, xmlopt) < 0 ||
         virDomainDiskBackingStoreFormat(buf, backingStore->backingStore,
                                         xmlopt, flags) < 0)
@@ -24135,7 +24132,7 @@ virDomainDiskDefFormat(virBufferPtr buf,
         virStorageAuthDefFormat(buf, def->src->auth);
 
     if (virDomainDiskSourceFormatInternal(buf, def->src, def->startupPolicy,
-                                          flags, true, true, xmlopt) < 0)
+                                          flags, true, xmlopt) < 0)
         return -1;
 
     /* Don't format backingStore to inactive XMLs until the code for
index 4a254806624da2d0d21c5eaabb5c7a1e152fb2b9..25c10a9af356d00764213c7203dbc29207c6294b 100644 (file)
@@ -3459,8 +3459,7 @@ int virDomainDiskDefCheckDuplicateInfo(const virDomainDiskDef *a,
 int virDomainStorageSourceFormat(virBufferPtr attrBuf,
                                  virBufferPtr childBuf,
                                  virStorageSourcePtr src,
-                                 unsigned int flags,
-                                 bool seclabels)
+                                 unsigned int flags)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
 
 int virDomainStorageSourceParse(xmlNodePtr node,
index 61785e129da2bc92c44ffdb5e18288ca575fe327..f38ca1409f7933913febd8d1813a168fbea27431 100644 (file)
@@ -2358,7 +2358,7 @@ qemuDomainObjPrivateXMLFormatNBDMigrationSource(virBufferPtr buf,
                       virStorageFileFormatTypeToString(src->format));
 
     if (virDomainStorageSourceFormat(&attrBuf, &childBuf, src,
-                                     VIR_DOMAIN_DEF_FORMAT_STATUS, true) < 0)
+                                     VIR_DOMAIN_DEF_FORMAT_STATUS) < 0)
         goto cleanup;
 
     if (qemuStorageSourcePrivateDataFormat(src, &privateDataBuf) < 0)