From 93d4585e7518e362bb20be4c3bb1632bc89be034 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 1 Apr 2014 17:30:06 -0600 Subject: [PATCH] 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 --- src/phyp/phyp_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- GitLab