Re: [dbus PATCH v2 05/22] Implement AttachDevice method for Domain Interface

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

 



On Thu, Apr 12, 2018 at 04:32:44PM +0200, Katerina Koukiou wrote:
> This method is not tested for now since the test driver
> doesn't suport this API.
> 
> Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx>
> ---
>  data/org.libvirt.Domain.xml |  6 ++++++
>  src/domain.c                | 25 +++++++++++++++++++++++++
>  2 files changed, 31 insertions(+)

[...]

> +static void
> +virtDBusDomainAttachDevice(GVariant *inArgs,
> +                           GUnixFDList *inFDs G_GNUC_UNUSED,
> +                           const gchar *objectPath,
> +                           gpointer userData,
> +                           GVariant **outArgs G_GNUC_UNUSED,
> +                           GUnixFDList **outFDs G_GNUC_UNUSED,
> +                           GError **error)
> +{
> +    virtDBusConnect *connect = userData;
> +    g_autoptr(virDomain) domain = NULL;
> +    const gchar *xml;
> +    guint flags;
> +
> +    g_variant_get(inArgs, "(&su)", &xml, &flags);
> +
> +    domain = virtDBusDomainGetVirDomain(connect, objectPath, error);
> +    if (!domain)
> +        return;
> +
> +    if (virDomainAttachDeviceFlags(domain, xml, flags) == -1)
> +        return virtDBusUtilSetLastVirtError(error);

There is no need to use 'return'.

Pavel

Attachment: signature.asc
Description: PGP 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]

  Powered by Linux