]> xenbits.xensource.com Git - libvirt.git/commitdiff
phyp: fix logic error on volume creation
authorEric Blake <eblake@redhat.com>
Tue, 1 Apr 2014 23:30:06 +0000 (17:30 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 2 Apr 2014 12:03:00 +0000 (06:03 -0600)
The phyp code claims that it wants a non-zero value, but actually
enforces a capacity of zero.  It has been this way since commit
ebc46fe in June 2010.  Bummer that it has my name as the committer
- I guess I should have been much more stubborn about not blindly
taking someone else's 1600-line patch.

* src/phyp/phyp_driver.c (phypStorageVolCreateXML): Use correct
logic.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/phyp/phyp_driver.c

index fc3e7db0af806c28f447cab8ee8fd68e32fa301e..3a5eefde5ca41101d5f78b06a20b810305c7020b 100644 (file)
@@ -2007,7 +2007,7 @@ phypStorageVolCreateXML(virStoragePoolPtr pool,
         goto err;
     }
 
-    if (voldef->capacity) {
+    if (!voldef->capacity) {
         VIR_ERROR(_("Capacity cannot be empty."));
         goto err;
     }