Re: [PATCH 01/12] conf: Introduce helper to find duplicate device address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]