Re: [dbus PATCH 2/8] Implement CompareCPU method for Connect Interface

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

 



On Thu, Apr 19, 2018 at 03:58:01PM +0200, Katerina Koukiou wrote:
> Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx>
> ---
>  data/org.libvirt.Connect.xml |  7 +++++++
>  src/connect.c                | 43 +++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 50 insertions(+)
> 
> diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml
> index 92f74c5..0fc34e3 100644
> --- a/data/org.libvirt.Connect.xml
> +++ b/data/org.libvirt.Connect.xml
> @@ -32,6 +32,13 @@
>        <arg name="flags" type="u" direction="in"/>
>        <arg name="cpu" type="s" direction="out"/>
>      </method>
> +    <method name="CompareCPU">
> +      <annotation name="org.gtk.GDBus.DocString"
> +        value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectCompareCPU"/>
> +      <arg name="xmlDesc" type="s" direction="in"/>
> +      <arg name="flags" type="u" direction="in"/>
> +      <arg name="compareResult" type="s" direction="out"/>
> +    </method>
>      <method name="DomainCreateXML">
>        <annotation name="org.gtk.GDBus.DocString"
>          value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainCreateXML"/>
> diff --git a/src/connect.c b/src/connect.c
> index bd959c7..86fea4f 100644
> --- a/src/connect.c
> +++ b/src/connect.c
> @@ -6,6 +6,13 @@
>  
>  #include <glib/gprintf.h>
>  
> +VIRT_DBUS_ENUM_DECL(virtDBusConnectCPUCompareResult)
> +VIRT_DBUS_ENUM_IMPL(virtDBusConnectCPUCompareResult,
> +                    VIR_CPU_COMPARE_LAST,
> +                    "incompatible",
> +                    "identical",
> +                    "superset")
> +
>  static gint virtDBusConnectCredType[] = {
>      VIR_CRED_AUTHNAME,
>      VIR_CRED_ECHOPROMPT,
> @@ -243,6 +250,41 @@ virtDBusConnectBaselineCPU(GVariant *inArgs,
>      *outArgs = g_variant_new("(s)", cpu);
>  }
>  
> +static void
> +virtDBusConnectCompareCPU(GVariant *inArgs,
> +                          GUnixFDList *inFDs G_GNUC_UNUSED,
> +                          const gchar *objectPath G_GNUC_UNUSED,
> +                          gpointer userData,
> +                          GVariant **outArgs,
> +                          GUnixFDList **outFDs G_GNUC_UNUSED,
> +                          GError **error)
> +{
> +    virtDBusConnect *connect = userData;
> +    const gchar *xmlDesc;
> +    guint flags;
> +    gint compareResult;
> +    g_autofree const gchar* compareResultStr = NULL;

s/g_autofree //

Reviewed-by: Pavel Hrdina <phrdina@xxxxxxxxxx>

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