[PATCH 08/14] util: storagefile: Preserve return value in virStorageSourceParseBackingJSONUriStr

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

 



virStorageSourceParseBackingURI will report special return values in
some cases. Preserve it in virStorageSourceParseBackingJSONUriStr.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/util/virstoragefile.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 4e57a0438e..192a79c025 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -3073,7 +3073,9 @@ virStorageSourceParseBackingJSONUriStr(virStorageSourcePtr src,
                                        const char *uri,
                                        int protocol)
 {
-    if (virStorageSourceParseBackingURI(src, uri) < 0)
+    int rc;
+
+    if ((rc = virStorageSourceParseBackingURI(src, uri)) < 0)
         return -1;

     if (src->protocol != protocol) {
@@ -3085,7 +3087,7 @@ virStorageSourceParseBackingJSONUriStr(virStorageSourcePtr src,
         return -1;
     }

-    return 0;
+    return rc;
 }


-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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