2010/8/25 Eduardo Otubo <otubo(a)linux.vnet.ibm.com>:
On 08/17/2010 04:04 PM, Eduardo Otubo wrote:
>
> When creating a new domain from an XML, the check for an existing
> domain name should compare the return of the function to a a valid
> LPAR ID (!= -1) and not to error (== -1).
> ---
> src/phyp/phyp_driver.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
> index 251111d..8eeba73 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;
> }
Any comments on this?
I would be glad!
Thanks,
ACK.
I applied and pushed this patch.
Matthias