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

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

 



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@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]