From 943c5758b0c00c788ea665bd833c585b724f2c25 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 23 Nov 2023 17:03:32 +0100 Subject: [PATCH] virStorageFileProbeGetMetadata: Do not partially skip probing of the image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since we consider the failure of parsing the backing store to be actually success based on the value we return to the caller, we should continue parsing also features and the 'compat' field so that we don't have a partial definition if e.g. the backing store format is not known. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- src/storage_file/storage_file_probe.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/storage_file/storage_file_probe.c b/src/storage_file/storage_file_probe.c index c73f533d2d..4cf052c03d 100644 --- a/src/storage_file/storage_file_probe.c +++ b/src/storage_file/storage_file_probe.c @@ -955,13 +955,9 @@ virStorageFileProbeGetMetadata(virStorageSource *meta, VIR_FREE(meta->backingStoreRaw); if (fileTypeInfo[meta->format].getBackingStore != NULL) { - int store = fileTypeInfo[meta->format].getBackingStore(&meta->backingStoreRaw, - &format, - buf, len); + fileTypeInfo[meta->format].getBackingStore(&meta->backingStoreRaw, + &format, buf, len); meta->backingStoreRawFormat = format; - - if (store == BACKING_STORE_INVALID) - return 0; } g_clear_pointer(&meta->features, virBitmapFree);