[PATCH 2/7] virStorageFileProbeGetMetadata: Do not partially skip probing of the image

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <pkrempa@xxxxxxxxxx>
---
 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);
-- 
2.42.0
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux