[libvirt] [python-PATCH] Fix libvirt_longlongWrap returning a very large value
Michal Privoznik
mprivozn at redhat.com
Mon Aug 11 14:43:13 UTC 2014
On 11.08.2014 14:59, Wang Rui wrote:
> From: Zhou Yimin <zhouyimin at huawei.com>
>
> If hypervisor is not Xen, the errs in struct _virDomainBlockStats will be -1.
> But in KVM when we call domain.blockStats(), errs is 18446744073709551615.
>
> To fix that, this patch has two changes:
> 1. Replace use of the PyLong_FromUnsignedLongLong with PyLong_FromLongLong
> in function libvirt_longlongWrap
> 2. If the paramemter of libvirt_longlongWrap is unsigned long long,
> use libvirt_ulonglongWrap instead because of above change.
>
> After this patch, errs is -1 which is consistent with virDomainBlockStats api.
>
> Signed-off-by: Zhou Yimin <zhouyimin at huawei.com>
> Signed-off-by: Wang Rui <moon.wangrui at huawei.com>
> ---
> libvirt-override.c | 18 +++++++++---------
> typewrappers.c | 2 +-
> 2 files changed, 10 insertions(+), 10 deletions(-)
ACKed & pushed. Congratulations on your first libvirt-python commit!
Michal
More information about the libvir-list
mailing list