Re: [dbus PATCH v2 17/22] Implement GetBlkioParameters method for domain Interface

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

 



On Thu, Apr 12, 2018 at 04:32:56PM +0200, Katerina Koukiou wrote:
> Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx>
> ---
>  data/org.libvirt.Domain.xml |  6 ++++++
>  src/domain.c                | 37 +++++++++++++++++++++++++++++++++++++
>  2 files changed, 43 insertions(+)

[...]

> +static void
> +virtDBusDomainGetBlkioParameters(GVariant *inArgs,
> +                                 GUnixFDList *inFDs G_GNUC_UNUSED,
> +                                 const gchar *objectPath,
> +                                 gpointer userData,
> +                                 GVariant **outArgs,
> +                                 GUnixFDList **outFDs G_GNUC_UNUSED,
> +                                 GError **error)
> +{
> +    virtDBusConnect *connect = userData;
> +    g_autoptr(virDomain) domain = NULL;
> +    g_autofree virTypedParameterPtr params = NULL;
> +    gint nparams = 0;
> +    guint flags;
> +    GVariant *grecords;
> +
> +    g_variant_get(inArgs, "(u)", &flags);
> +
> +    domain = virtDBusDomainGetVirDomain(connect, objectPath, error);
> +    if (!domain)
> +        return;
> +
> +    if (virDomainGetBlkioParameters(domain, NULL, &nparams, flags) == 0 &&
> +        nparams != 0) {
> +        if ((params = g_new0(virTypedParameter, nparams)) == NULL)
> +            return;
> +        if (virDomainGetBlkioParameters(domain, params, &nparams, flags))
> +            return virtDBusUtilSetLastVirtError(error);
> +    }
> +
> +    grecords = virtDBusUtilTypedParamsToGVariant(params,
> +                                                 nparams);

Same comments as for the previous patch.

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