]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
rbd: Return error from rbd_create for message processing
authorJohn Ferlan <jferlan@redhat.com>
Thu, 16 Jul 2015 16:28:58 +0000 (12:28 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 16 Jul 2015 16:31:25 +0000 (12:31 -0400)
Resolving an error reporting bug introduced by commit id '761491e' which
just took the return of virStorageBackendRBDCreateImage and used it as
the basis for the message generated. This would generate EPERM regardless
of error seen.

src/storage/storage_backend_rbd.c

index 1e35c1f6db74b9ead587439a5b207289ba99ec76..ac5085a9c677999137cec28c0f55ee3a73918dcd 100644 (file)
@@ -484,10 +484,7 @@ static int virStorageBackendRBDCreateImage(rados_ioctx_t io,
                                            char *name, long capacity)
 {
     int order = 0;
-    if (rbd_create(io, name, capacity, &order) < 0)
-        return -1;
-
-    return 0;
+    return rbd_create(io, name, capacity, &order);
 }
 
 static int