[libvirt] [PATCH]: fix ruby-libvirt bindings when virConnectNum* returns 0

Chris Lalancette clalance at redhat.com
Tue Jun 17 09:16:31 UTC 2008


Attached is a simple patch to fix a problem I ran into when using the
ruby-libvirt bindings with libvirt 0.4.3.  Basically, if you call any of the
virConnectList* functions with a "max" of 0, it returns "Invalid Arg".  To get
around this, modify the ruby-libvirt bindings to return an empty list if we get
num == 0 when calling the corresponding virConnectNumOf* function.  This should
solve: https://bugzilla.redhat.com/show_bug.cgi?id=451666

Signed-off-by: Chris Lalancette <clalance at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ruby-libvirt-num-0.patch
Type: text/x-patch
Size: 1144 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080617/8b2ed558/attachment-0001.bin>


More information about the libvir-list mailing list