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 <eblake@redhat.com>
This commit is contained in:
Eric Blake 2014-04-01 17:30:06 -06:00
parent e9d09fe196
commit 93d4585e75

View File

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