[PATCH 2/9] virStorageFileGetMetadataRecurse: Remove impossible error report

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

 



We call virStorageFileSupportsBackingChainTraversal which already checks
that the 'storageFileRead' callback is non-NULL, which in turn means
that virStorageFileRead will not return -2.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/util/virstoragefile.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 4d2e39246c..7aeeab0739 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -5003,15 +5003,8 @@ virStorageFileGetMetadataRecurse(virStorageSourcePtr src,
         goto cleanup;

     if ((headerLen = virStorageFileRead(src, 0, VIR_STORAGE_MAX_HEADER,
-                                        &buf)) < 0) {
-        if (headerLen == -2)
-            virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("storage file reading is not supported for "
-                             "storage type %s (protocol: %s)"),
-                           virStorageTypeToString(src->type),
-                           virStorageNetProtocolTypeToString(src->protocol));
+                                        &buf)) < 0)
         goto cleanup;
-    }

     if (virStorageFileGetMetadataInternal(src, buf, headerLen,
                                           &backingFormat) < 0)
-- 
2.24.1





[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