[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v2] qemu: fix return value issue



On 08/01/2011 09:45 AM, Alex Jia wrote:
> whether or not previous return value is -1, the following codes will be 
> executed for a inactive guest in src/qemu/qemu_driver.c:
> ret = virDomainSaveConfig(driver->configDir, persistentDef);
> and if everything is okay, 'ret' is assigned to 0, the previous 'ret'
> will be overwritten, this patch will fix this issue.  
> 

> +++ b/src/qemu/qemu_driver.c
> @@ -5688,7 +5688,9 @@ static int qemuDomainSetBlkioParameters(virDomainPtr dom,
>                  ret = -1;
>              }
>          }
> -        ret = virDomainSaveConfig(driver->configDir, persistentDef);
> +
> +        if (virDomainSaveConfig(driver->configDir, persistentDef) < 0)
> +            ret = -1;
>      }

ACK and pushed.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]