[libvirt] [PATCH 01/13] vbox: Rewrite vboxNetworkOpen

Michal Privoznik mprivozn at redhat.com
Wed Aug 20 16:20:48 UTC 2014


On 20.08.2014 02:17, Taowei wrote:
> ---
>   src/vbox/vbox_common.c        |   28 ++++++++++++++++++++++++++++
>   src/vbox/vbox_tmpl.c          |   24 ------------------------
>   src/vbox/vbox_uniformed_api.h |    3 +++
>   3 files changed, 31 insertions(+), 24 deletions(-)
>
> diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
> index b186ea8..b7251e5 100644
> --- a/src/vbox/vbox_common.c
> +++ b/src/vbox/vbox_common.c
> @@ -7453,6 +7453,34 @@ vboxNodeGetFreePages(virConnectPtr conn ATTRIBUTE_UNUSED,
>   }
>
>   /**
> + * The Network Functions here on
> + */
> +
> +virDrvOpenStatus vboxNetworkOpen(virConnectPtr conn,
> +                                 virConnectAuthPtr auth ATTRIBUTE_UNUSED,
> +                                 unsigned int flags)
> +{
> +    vboxGlobalData *data = conn->privateData;
> +
> +    virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
> +
> +    if (STRNEQ(conn->driver->name, "VBOX"))
> +        goto cleanup;
> +
> +    if ((data->pFuncs      == NULL) ||
> +        (data->vboxObj     == NULL) ||
> +        (data->vboxSession == NULL))
> +        goto cleanup;

While you're at this you can reformat these, s/ +==/ ==/.
Here and in the rest of the patches.

Michal




More information about the libvir-list mailing list