[libvirt] [PATCH 01/12] conf: Introduce helper to find duplicate device address
Ján Tomko
jtomko at redhat.com
Mon Feb 9 15:51:24 UTC 2015
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
-------------- 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/66570323/attachment-0001.sig>
More information about the libvir-list
mailing list