]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Invert 'skipSeclabels' argument of virDomainDiskSourceFormatInternal
authorPeter Krempa <pkrempa@redhat.com>
Wed, 6 Mar 2019 16:22:04 +0000 (17:22 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 20 Mar 2019 07:17:05 +0000 (08:17 +0100)
Rename it to 'seclabels' and invert the value.

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 504c24b5457fb4dab3cc626bf82522ed12fe585f..97d56c00670dbff1ddf5ed8a44635a50c66759d0 100644 (file)
@@ -23760,7 +23760,7 @@ virDomainStorageSourceFormat(virBufferPtr attrBuf,
                              virBufferPtr childBuf,
                              virStorageSourcePtr src,
                              unsigned int flags,
-                             bool skipSeclabels)
+                             bool seclabels)
 {
     switch ((virStorageType)src->type) {
     case VIR_STORAGE_TYPE_FILE:
@@ -23800,7 +23800,7 @@ virDomainStorageSourceFormat(virBufferPtr attrBuf,
         return -1;
     }
 
-    if (!skipSeclabels && src->type != VIR_STORAGE_TYPE_NETWORK)
+    if (seclabels && src->type != VIR_STORAGE_TYPE_NETWORK)
         virDomainSourceDefFormatSeclabel(childBuf, src->nseclabels,
                                          src->seclabels, flags);
 
@@ -23832,7 +23832,7 @@ virDomainDiskSourceFormatInternal(virBufferPtr buf,
                                   virStorageSourcePtr src,
                                   int policy,
                                   unsigned int flags,
-                                  bool skipSeclabels,
+                                  bool seclabels,
                                   bool attrIndex,
                                   virDomainXMLOptionPtr xmlopt)
 {
@@ -23843,7 +23843,7 @@ virDomainDiskSourceFormatInternal(virBufferPtr buf,
     virBufferSetChildIndent(&childBuf, buf);
 
     if (virDomainStorageSourceFormat(&attrBuf, &childBuf, src, flags,
-                                     skipSeclabels) < 0)
+                                     seclabels) < 0)
         goto cleanup;
 
     if (policy && src->type != VIR_STORAGE_TYPE_NETWORK)
@@ -23873,7 +23873,7 @@ virDomainDiskSourceFormat(virBufferPtr buf,
                           unsigned int flags,
                           virDomainXMLOptionPtr xmlopt)
 {
-    return virDomainDiskSourceFormatInternal(buf, src, policy, flags, false,
+    return virDomainDiskSourceFormatInternal(buf, src, policy, flags, true,
                                              false, xmlopt);
 }
 
@@ -23916,7 +23916,7 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf,
 
     virBufferAsprintf(buf, "<format type='%s'/>\n", format);
     /* We currently don't output seclabels for backing chain element */
-    if (virDomainDiskSourceFormatInternal(buf, backingStore, 0, flags, true,
+    if (virDomainDiskSourceFormatInternal(buf, backingStore, 0, flags, false,
                                           false, xmlopt) < 0 ||
         virDomainDiskBackingStoreFormat(buf, backingStore->backingStore,
                                         xmlopt, flags) < 0)
@@ -24175,7 +24175,7 @@ virDomainDiskDefFormat(virBufferPtr buf,
         virStorageAuthDefFormat(buf, def->src->auth);
 
     if (virDomainDiskSourceFormatInternal(buf, def->src, def->startupPolicy,
-                                          flags, false, true, xmlopt) < 0)
+                                          flags, true, true, xmlopt) < 0)
         return -1;
 
     /* Don't format backingStore to inactive XMLs until the code for
index 538fb50b9ea84be8bc7e2a1cafa0ec55c790c0a8..cad330715ba3eca207f1c31e2b506cec5dcd71b2 100644 (file)
@@ -3461,7 +3461,7 @@ int virDomainStorageSourceFormat(virBufferPtr attrBuf,
                                  virBufferPtr childBuf,
                                  virStorageSourcePtr src,
                                  unsigned int flags,
-                                 bool skipSeclabels)
+                                 bool seclabels)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
 
 int virDomainStorageSourceParse(xmlNodePtr node,
index 86e80391e19fd27634d331e051a02fce3bc5dc3a..341ea7d37cb546dd7ee1c3800b94a934adb24ba6 100644 (file)
@@ -2358,7 +2358,7 @@ qemuDomainObjPrivateXMLFormatNBDMigrationSource(virBufferPtr buf,
                       virStorageFileFormatTypeToString(src->format));
 
     if (virDomainStorageSourceFormat(&attrBuf, &childBuf, src,
-                                     VIR_DOMAIN_DEF_FORMAT_STATUS, false) < 0)
+                                     VIR_DOMAIN_DEF_FORMAT_STATUS, true) < 0)
         goto cleanup;
 
     if (qemuStorageSourcePrivateDataFormat(src, &privateDataBuf) < 0)