On 06/11/2012 04:34 AM, Peter Krempa wrote: > This patch adds support for listing all domains into drivers that use > the common virDomainObj implementation: libxl, lxc, openvz, qemu, test, > uml, vmware. > > For drivers that don't support managed save images the guests are > treated as if they had none, so filtering guests that do have such an > image on this driver succeeds and produces 0 results. > --- > Diff to v2: > - removed driver specific checks now that they're not needed > - changed flag check to use new macros > - reordered assignment of the function pointer do driver struct > --- > src/libxl/libxl_driver.c | 20 ++++++++++++++++++++ > src/lxc/lxc_driver.c | 19 +++++++++++++++++++ > src/openvz/openvz_driver.c | 19 +++++++++++++++++++ > src/qemu/qemu_driver.c | 19 +++++++++++++++++++ > src/test/test_driver.c | 19 +++++++++++++++++++ > src/uml/uml_driver.c | 18 ++++++++++++++++++ > src/vmware/vmware_driver.c | 20 ++++++++++++++++++++ > +static int > +libxlListAllDomains(virConnectPtr conn, > + virDomainPtr **domains, > + unsigned int flags) > +{ > + libxlDriverPrivatePtr driver = conn->privateData; > + int ret = -1; > + > + virCheckFlags(VIR_CONNECT_LIST_FILTERS_ALL, 1); s/1/-1/, otherwise you aren't properly reporting failure. > @@ -3912,6 +3930,7 @@ static virDriver lxcDriver = { > .domainOpenConsole = lxcDomainOpenConsole, /* 0.8.6 */ > .isAlive = lxcIsAlive, /* 0.9.8 */ > .nodeSuspendForDuration = nodeSuspendForDuration, /* 0.9.8 */ > + .listAllDomains = lxcListAllDomains, /* 0.9.13 */ Is it worth listing this line next to the other listing callbacks? ACK with the libxl bug fixed. -- Eric Blake eblake@xxxxxxxxxx +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list