]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix error squashing when refreshing file volumes
authorCole Robinson <crobinso@redhat.com>
Tue, 12 May 2009 19:59:46 +0000 (19:59 +0000)
committerCole Robinson <crobinso@redhat.com>
Tue, 12 May 2009 19:59:46 +0000 (19:59 +0000)
ChangeLog
src/storage_backend.c
src/storage_backend_fs.c

index 39626a58a12c6f03e75140313b72c768f27f6153..f1f249bf3b9a77e0ad7a9d505e2d1b5f42642412 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue May 12 15:58:28 EDT 2009 Cole Robinson <crobinso@redhat.com>
+
+       * src/storage_backend.c: Document a function
+       * src/storage_backend_fs.c: Don't squash file probe errors.
+
 Tue May 12 17:45:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
 
        * .hgignore, tests/.cvsignore, tests/.gitignore: Ignore
index b1541407a989ef4944c204849432e5e960fc48c9..2db314dfabe69c307c718292d5bab7a9a446f899 100644 (file)
@@ -156,6 +156,17 @@ virStorageBackendUpdateVolInfo(virConnectPtr conn,
     return 0;
 }
 
+/*
+ * virStorageBackendUpdateVolTargetInfoFD:
+ * @conn: connection to report errors on
+ * @target: target definition ptr of volume to update
+ * @fd: fd of storage volume to update
+ * @allocation: If not NULL, updated allocation information will be stored
+ * @capacity: If not NULL, updated capacity info will be stored
+ *
+ * Returns 0 for success-1 on a legitimate error condition,
+ *    -2 if passed FD isn't a regular, char, or block file.
+ */
 int
 virStorageBackendUpdateVolTargetInfoFD(virConnectPtr conn,
                                        virStorageVolTargetPtr target,
index 92ff3cb408ca7b385cc04837e51ec90ee0c31a77..d64b64d2fd7597cd719419d6e7798a8da035c69c 100644 (file)
@@ -843,7 +843,7 @@ virStorageBackendFileSystemRefresh(virConnectPtr conn,
                                                 &vol->allocation,
                                                 &vol->capacity) < 0)) {
             if (ret == -1)
-                goto no_memory;
+                goto cleanup;
             else {
                 /* Silently ignore non-regular files,
                  * eg '.' '..', 'lost+found' */
@@ -883,7 +883,7 @@ virStorageBackendFileSystemRefresh(virConnectPtr conn,
                                                         &vol->backingStore,
                                                         NULL, NULL, NULL)) < 0) {
                     if (ret == -1)
-                        goto no_memory;
+                        goto cleanup;
                     else {
                         /* Silently ignore non-regular files,
                          * eg '.' '..', 'lost+found' */