On Fri, Feb 06, 2015 at 04:32:15PM +0100, Peter Krempa wrote: > When adding devices to the definition it's useful to check whether the > devices don't reside on a conflicting address. This patch adds a helper > that iterates all device info and comapres the addresses with the given s/comapres/compares/ > info. > --- > src/conf/domain_conf.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++ > src/conf/domain_conf.h | 4 ++ > src/libvirt_private.syms | 1 + > 3 files changed, 103 insertions(+) > > --- a/src/conf/domain_conf.h > +++ b/src/conf/domain_conf.h > @@ -2382,6 +2382,10 @@ int virDomainDeviceInfoIterate(virDomainDefPtr def, > virDomainDeviceInfoCallback cb, > void *opaque); > > +bool virDomainDeviceInfoHasAddress(virDomainDefPtr def, > + virDomainDeviceInfoPtr info) > + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK; > + > void virDomainDefFree(virDomainDefPtr vm); From the function name, I'd expect it to return true if there is an address specified in info. How about virDomainDefHasDeviceAddress? ACK regardless of the name. Jan
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list