Re: [PATCH python] libvirt-override: fix setBlockIoTune failure passed

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

 



On Tue, Dec 06, 2016 at 10:47:51 +0800, xieyingtai@xxxxxxxxxx wrote:
> From: Yingtai Xie <xieyingtai@xxxxxxxxxx>
> 
> virDomainGetBlockIoTune() will be called before setBlockIoTune, as a result,
> it leads to a failure if set flags with VIR_DOMAIN_AFFECT_LIVE |
> VIR_DOMAIN_AFFECT_CONFIG which is an reasonable option.
> 
> Signed-off-by: Yingtai Xie <xieyingtai@xxxxxxxxxx>
> ---
>  libvirt-override.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/libvirt-override.c b/libvirt-override.c
> index 2de95ce..caa52fb 100644
> --- a/libvirt-override.c
> +++ b/libvirt-override.c
> @@ -4805,6 +4805,7 @@ libvirt_virDomainSetBlockIoTune(PyObject *self ATTRIBUTE_UNUSED,
>      Py_ssize_t size = 0;
>      const char *disk;
>      unsigned int flags;
> +    unsigned int flags1 = 0;

You don't need a extra variable for what you've done below. Also the
variable name does not really give an idea what it's used for.

Either choose a better name, or drop the variable completely.

Attachment: signature.asc
Description: PGP signature

--
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]
  Powered by Linux