Re: [dbus PATCH v2 2/3] Implement FSThaw method for Domain Interface

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

 



On Wed, Apr 18, 2018 at 05:14:17PM +0200, Ján Tomko wrote:
> On Wed, Apr 18, 2018 at 01:52:18PM +0200, Katerina Koukiou wrote:
> > Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx>
> > ---
> > data/org.libvirt.Domain.xml |  7 +++++++
> > src/domain.c                | 41 +++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 48 insertions(+)
> > 
> > diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml
> > index 1d2d760..e11b0b7 100644
> > --- a/data/org.libvirt.Domain.xml
> > +++ b/data/org.libvirt.Domain.xml
> > @@ -143,6 +143,13 @@
> >       <arg name="flags" type="u" direction="in"/>
> >       <arg name="frozenFilesystems" type="u" direction="out"/>
> >     </method>
> > +    <method name="FSThaw">
> > +      <annotation name="org.gtk.GDBus.DocString"
> > +        value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainFSThaw"/>
> > +      <arg name="mountpoints" type="as" direction="in"/>
> > +      <arg name="flags" type="u" direction="in"/>
> > +      <arg name="thawdFilesystems" type="u" direction="out"/>
> 
> 'thawed' is the correct spelling (don't worry, Peter, I actually looked it up
> in the dictionary this time)
> 
> > +    </method>
> >     <method name="FSTrim">
> >       <annotation name="org.gtk.GDBus.DocString"
> >           value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainFSTrim
> > diff --git a/src/domain.c b/src/domain.c
> > index 9a6ff1d..bcec3e6 100644
> > --- a/src/domain.c
> > +++ b/src/domain.c
> > @@ -717,6 +717,46 @@ virtDBusDomainFSFreeze(GVariant *inArgs,
> >     *outArgs = g_variant_new("(u)", ret);
> > }
> > 
> > +static void
> > +virtDBusDomainFSThaw(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 const gchar **mountpoints = NULL;
> > +    const gchar **tmp;
> > +    GVariantIter *iter;
> > +    guint nmountpoints;
> > +    guint flags;
> > +    gint ret;
> > +
> > +    g_variant_get(inArgs, "(asu)", &iter, &flags);
> > +
> > +    nmountpoints = g_variant_iter_n_children(iter);
> > +    if (nmountpoints > 0) {
> > +        mountpoints = g_new0(const gchar*, nmountpoints);
> 
> nmountpoints + 1
> 
> > +        tmp = mountpoints;
> > +        while (g_variant_iter_loop(iter, "&s", tmp))
> > +            tmp++;
> 
> > +        g_variant_iter_free(iter);
> > +    }
> 
> Exchange these two lines.

With the same changes as for the previous patch

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