[libvirt] [PATCH v2] qemu: fix return value issue
Eric Blake
eblake at redhat.com
Mon Aug 1 15:41:33 UTC 2011
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 at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
More information about the libvir-list
mailing list