[libvirt] [PATCH 01/12] conf: Introduce helper to find duplicate device address
Peter Krempa
pkrempa at redhat.com
Mon Feb 9 16:36:54 UTC 2015
On Mon, Feb 09, 2015 at 16:51:24 +0100, Ján Tomko wrote:
> 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?
Indeed. I copied the name from the universal interator that is added a
few lines above in the .c file. Your name makes more sense.
>
> ACK regardless of the name.
>
> Jan
Thanks.
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150209/e748a4e5/attachment-0001.sig>
More information about the libvir-list
mailing list