[libvirt] [dbus PATCH v2 11/22] Implement MigrateGetMaxDowntime method for Domain Interface

Pavel Hrdina phrdina at redhat.com
Fri Apr 13 10:01:03 UTC 2018


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

[...]

> +static void
> +virtDBusDomainMigrateGetMaxDowntime(GVariant *inArgs,
> +                                    GUnixFDList *inFDs G_GNUC_UNUSED,
> +                                    const gchar *objectPath,
> +                                    gpointer userData,
> +                                    GVariant **outArgs G_GNUC_UNUSED,

outArgs is used so remove G_GNUC_UNUSED

> +                                    GUnixFDList **outFDs G_GNUC_UNUSED,
> +                                    GError **error)
> +{
> +    virtDBusConnect *connect = userData;
> +    g_autoptr(virDomain) domain = NULL;
> +    guint64 downtime;

For consistency this could be gulong and also in the previous patch.
Both are 'unsigned long'.

> +    guint flags;
> +    gint ret;
> +
> +    g_variant_get(inArgs, "(u)", &flags);
> +
> +    domain = virtDBusDomainGetVirDomain(connect, objectPath, error);
> +    if (!domain)
> +        return;
> +
> +    ret = virDomainMigrateGetMaxDowntime(domain,
> +                                         (long long unsigned int *)&downtime,

The 'int' is redundant, you can remove it, and usually we put the
'unsigned' keyword as first one.

Pavel
-------------- 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/20180413/e936f7e3/attachment-0001.sig>


More information about the libvir-list mailing list