[libvirt] [PATCHv2 1/7] Introduce virDomainVsockDef
Peter Krempa
pkrempa at redhat.com
Tue May 29 07:39:14 UTC 2018
On Thu, May 24, 2018 at 12:39:09 +0200, Ján Tomko wrote:
> A type to represent the new vsock device.
> Also implement an allocation function to allow future addition
> of private data.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1291851
>
> Signed-off-by: Ján Tomko <jtomko at redhat.com>
> ---
> src/conf/domain_conf.c | 21 +++++++++++++++++++++
> src/conf/domain_conf.h | 8 ++++++++
> src/libvirt_private.syms | 1 +
> 3 files changed, 30 insertions(+)
>
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 3689ac0a82..5b4b182fd2 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -2027,6 +2027,27 @@ virDomainActualNetDefFree(virDomainActualNetDefPtr def)
> VIR_FREE(def);
> }
>
> +
> +virDomainVsockDefPtr
> +virDomainVsockDefNew(virDomainXMLOptionPtr xmlopt ATTRIBUTE_UNUSED)
> +{
> + virDomainVsockDefPtr ret = NULL;
> + virDomainVsockDefPtr vsock;
> +
> + if (VIR_ALLOC(vsock) < 0)
> + return NULL;
> +
> + VIR_STEAL_PTR(ret, vsock);
> + return ret;
> +}
> +
> +
> +void
> +virDomainVsockDefFree(virDomainVsockDefPtr vsock ATTRIBUTE_UNUSED)
> +{
You should 'VIR_FREE(vsock)' here, as otherwise this does not do what
the name suggests ...
> +}
> +
> +
> void
> virDomainNetDefClear(virDomainNetDefPtr def)
ACK with the modification above
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180529/71b43516/attachment-0001.sig>
More information about the libvir-list
mailing list