From 09d37bdef5a00d9df35833c32f8740fc4ec4d31e Mon Sep 17 00:00:00 2001 From: Eduardo Otubo Date: Tue, 17 Aug 2010 16:04:49 -0300 Subject: [PATCH] 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). --- 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 251111d5d0..8eeba73fb2 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -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; } -- 2.39.5