PHYP: Bad comparison when checking for existing domain name

When creating a new domain from XML, the check for an existing
domain name should compare the return of the function to a valid
LPAR ID (!= -1) and not to error (== -1).
This commit is contained in:
Eduardo Otubo 2010-08-17 16:04:49 -03:00 committed by Matthias Bolte
parent e1bd99ab7e
commit 09d37bdef5

View File

@ -3759,7 +3759,7 @@ phypDomainCreateAndStart(virConnectPtr conn,
goto err;
/* checking if this name already exists on this system */
if (phypGetLparID(session, managed_system, def->name, conn) == -1) {
if (phypGetLparID(session, managed_system, def->name, conn) != -1) {
VIR_WARN0("LPAR name already exists.");
goto err;
}