[Spice-devel] [PATCH vdagent 02/11] vdagent: remove fx_dir magic values

Jakub Janků janku.jakub.jj at gmail.com
Wed Sep 27 14:38:13 UTC 2017


On Wed, Sep 27, 2017 at 1:57 PM Frediano Ziglio <fziglio at redhat.com> wrote:

> >
> > Hi,
> >
> > On Wed, Sep 27, 2017 at 11:40:40AM +0000, Frediano Ziglio wrote:
> > > >
> > > > Hi,
> > > >
> > > > On Wed, Sep 27, 2017 at 10:24:46AM +0000, Frediano Ziglio wrote:
> > > > > >
> > > > > > ---
> > > > > >  src/vdagent/vdagent.c | 17 ++++++-----------
> > > > > >  1 file changed, 6 insertions(+), 11 deletions(-)
> > > > > >
> > > > > > diff --git a/src/vdagent/vdagent.c b/src/vdagent/vdagent.c
> > > > > > index dfb9284..6b4c127 100644
> > > > > > --- a/src/vdagent/vdagent.c
> > > > > > +++ b/src/vdagent/vdagent.c
> > > > > > @@ -168,7 +168,7 @@ static void usage(FILE *fp)
> > > > > >        "  -s <port>                         set virtio serial
> port\n"
> > > > > >        "  -S <filename>                     set udcs socket\n"
> > > > > >        "  -x                                don't daemonize\n"
> > > > > > -      "  -f <dir|xdg-desktop|xdg-download> file xfer save dir\n"
> > > > > > +      "  -f <dir>                          file xfer save dir\n"
> > > > > >        "  -o <0|1>                          open dir on file xfer
> > > > > >        completion\n",
> > > > > >        VERSION);
> > > > > >  }
> > > > > > @@ -313,18 +313,13 @@ reconnect:
> > > > > >          return 1;
> > > > > >      }
> > > > > >
> > > > > > -    if (!fx_dir) {
> > > > > > -        if (vdagent_x11_has_icons_on_desktop(x11))
> > > > > > -            fx_dir = "xdg-desktop";
> > > > > > -        else
> > > > > > -            fx_dir = "xdg-download";
> > > > > > -    }
> > > > > > +    if (!fx_dir)
> > > > > > +        fx_dir =
> > > > > > g_get_user_special_dir(vdagent_x11_has_icons_on_desktop(x11) ?
> > > > > > +
> G_USER_DIRECTORY_DESKTOP :
> > > > > > +
> G_USER_DIRECTORY_DOWNLOAD);
> > > > > >      if (fx_open_dir == -1)
> > > > > >          fx_open_dir = !vdagent_x11_has_icons_on_desktop(x11);
> > > > > > -    if (!strcmp(fx_dir, "xdg-desktop"))
> > > > > > -        fx_dir =
> g_get_user_special_dir(G_USER_DIRECTORY_DESKTOP);
> > > > > > -    else if (!strcmp(fx_dir, "xdg-download"))
> > > > > > -        fx_dir =
> g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD);
> > > > > > +
> > > > > >      if (fx_dir) {
> > > > > >          vdagent_file_xfers = vdagent_file_xfers_create(client,
> > > > > >          fx_dir,
> > > > > >
>  fx_open_dir,
> > > > > >                                                         debug);
> > > > >
> > > > > This will break updated if some people configured these values.
> > > > > I think we can have GLib and the current behaviour.
> > > >
> > > > If we do a release before this changes, we can deprecate this
> options in
> > > > the release and remove them after the release.
> > > >
> > > > Personally, I don't see much reason to keep this extra options
> around.
> > > >
> > > > Cheers,
> > > >     Victor
> > > >
> > >
> > > The rule we agree on is one release to announce the deprecation and
> > > remove the feature after 2 releases that is on the current schema
> 0.20.0.
> > >
> > > Frediano
> >
> > For all components? One thing is spice-server and spice-gtk which are
> > libraries for QEMU and virt-viewer, etc. The agent is not a library and
> > we are breaking command line options...
> >
> > Cheers,
> >     toso
> >
> >
>
> Command line options for an application is the public interface.
> I would follow the rule for all public interfaces.
>
> Frediano
>

I don't mind keeping this option, although it's imho kinda useless.
Should it be marked as deprecated?

Cheers,
Jakub
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170927/909cf4ca/attachment.html>


More information about the Spice-devel mailing list