On 11.08.2014 14:59, Wang Rui wrote:
From: Zhou Yimin <[email protected]>

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 <[email protected]>
Signed-off-by: Wang Rui <[email protected]>
---
  libvirt-override.c | 18 +++++++++---------
  typewrappers.c     |  2 +-
  2 files changed, 10 insertions(+), 10 deletions(-)

ACKed & pushed. Congratulations on your first libvirt-python commit!

Michal

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to