This version contains a bug, pls use v3 version of it at
https://www.redhat.com/archives/libvirt-cim/2012-December/msg00016.html
my mistake, sorry for that.
Original implemetion may return pools with NULL name if
some pool disappear between two libvirt pool API call. And
caller of this function consider number = 0 as error only
but it original return negative value when error before.
This patch fix it.
V2:
Use for instead of while in clean up.
Treat zero pool returned from libvirt as normal instead of error.
Rebased.
v3:
fix wrong i++ in for while, previous patch have this bug, it is patch 6/11,
please ignore 6/11 in v2 serial.
Signed-off-by: Wenchao Xia <xiawenc(a)linux.vnet.ibm.com>
---
src/Virt_DevicePool.c | 39 +++++++++++++++++++++++++++++----------
1 files changed, 29 insertions(+), 10 deletions(-)
--
Best Regards
Wenchao Xia