]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
storagefile: Fill in meta->externalDataStoreRaw
authorCole Robinson <crobinso@redhat.com>
Sat, 5 Oct 2019 00:19:22 +0000 (20:19 -0400)
committerCole Robinson <crobinso@redhat.com>
Fri, 11 Oct 2019 18:25:59 +0000 (14:25 -0400)
Call qcow2GetExtensions to actually fill in the virStorageSource
externalDataStoreRaw member

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
src/util/virstoragefile.c

index 2e0b61fc89e677fd14d20bb82d1e2c34cf1e6fc6..bb827e26eba50bd2aee81128932504e63f45d905 100644 (file)
@@ -1061,6 +1061,12 @@ virStorageFileGetMetadataInternal(virStorageSourcePtr meta,
         fileTypeInfo[meta->format].getFeatures(&meta->features, meta->format, buf, len) < 0)
         return -1;
 
+    VIR_FREE(meta->externalDataStoreRaw);
+    if (meta->format == VIR_STORAGE_FILE_QCOW2 &&
+        qcow2GetExtensions(buf, len, NULL, &meta->externalDataStoreRaw) < 0) {
+        return -1;
+    }
+
     VIR_FREE(meta->compat);
     if (meta->format == VIR_STORAGE_FILE_QCOW2 && meta->features &&
         VIR_STRDUP(meta->compat, "1.1") < 0)