mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
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:
parent
e1bd99ab7e
commit
09d37bdef5
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user