From 556f7c68a0008b7467b306093eb106a10b7fca45 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Fri, 4 Oct 2019 20:19:22 -0400 Subject: [PATCH] storagefile: Fill in meta->externalDataStoreRaw Call qcow2GetExtensions to actually fill in the virStorageSource externalDataStoreRaw member Reviewed-by: Daniel Henrique Barboza Reviewed-by: Michal Privoznik Signed-off-by: Cole Robinson --- src/util/virstoragefile.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 2e0b61fc89..bb827e26eb 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -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)