From: Eric Blake Date: Tue, 1 Apr 2014 23:30:06 +0000 (-0600) Subject: phyp: fix logic error on volume creation X-Git-Tag: v1.2.4-rc1~205 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93d4585e7518e362bb20be4c3bb1632bc89be034;p=thirdparty%2Flibvirt.git phyp: fix logic error on volume creation 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 --- diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index fc3e7db0af..3a5eefde5c 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -2007,7 +2007,7 @@ phypStorageVolCreateXML(virStoragePoolPtr pool, goto err; } - if (voldef->capacity) { + if (!voldef->capacity) { VIR_ERROR(_("Capacity cannot be empty.")); goto err; }