Re: [PATCH spice-gtk 1/5] Rename spice-usbredir-filter option to spice-usbredir-auto-redirect-filter

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

 



On Fri, Sep 21, 2012 at 05:32:21PM +0200, Hans de Goede wrote:
> The spice-usbredir-filter cmdline option was not chosen well, as it does
> not indicate what it filters. Now that we are also getting a filter for
> selecting already plugged in devices to redirect when a spice connection gets
> established, it needs to be renamed to make its function more clear.

This is some kind of ABI break as scripts using the old option name will be
broken. You don't seem to be reusing the old name for something else in
this series, so maybe we can keep it and output a deprecation warning when
it's used for now? On the other hand, this option is probably not widely
used, so maybe breaking things now will not be too bad...
https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=823541 seems to
indicate there's at least one user of it.

Christophe

> 
> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
> ---
>  gtk/spice-option.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/gtk/spice-option.c b/gtk/spice-option.c
> index 715e84a..1333766 100644
> --- a/gtk/spice-option.c
> +++ b/gtk/spice-option.c
> @@ -32,7 +32,7 @@ static char *ca_file = NULL;
>  static char *host_subject = NULL;
>  static char *smartcard_db = NULL;
>  static char *smartcard_certificates = NULL;
> -static char *usbredir_filter = NULL;
> +static char *usbredir_auto_redirect_filter = NULL;
>  static gboolean smartcard = FALSE;
>  static gboolean disable_audio = FALSE;
>  static gboolean disable_usbredir = FALSE;
> @@ -131,8 +131,8 @@ GOptionGroup* spice_get_option_group(void)
>            N_("Path to the local certificate database to use for software smartcard certificates"), N_("<certificate-db>") },
>          { "spice-disable-usbredir", '\0', 0, G_OPTION_ARG_NONE, &disable_usbredir,
>            N_("Disable USB redirection support"), NULL },
> -        { "spice-usbredir-filter", '\0', 0, G_OPTION_ARG_STRING, &usbredir_filter,
> -          N_("Filter for excluding USB devices from auto redirection"), N_("<filter-string>") },
> +        { "spice-usbredir-auto-redirect-filter", '\0', 0, G_OPTION_ARG_STRING, &usbredir_auto_redirect_filter,
> +          N_("Filter selecting USB devices to be auto-redirected when plugged in"), N_("<filter-string>") },
>          { "spice-cache-size", '\0', 0, G_OPTION_ARG_INT, &cache_size,
>            N_("Image cache size"), N_("<bytes>") },
>          { "spice-glz-window-size", '\0', 0, G_OPTION_ARG_INT, &glz_window_size,
> @@ -195,10 +195,11 @@ void spice_set_session_option(SpiceSession *session)
>          if (smartcard_db)
>              g_object_set(session, "smartcard-db", smartcard_db, NULL);
>      }
> -    if (usbredir_filter) {
> +    if (usbredir_auto_redirect_filter) {
>          SpiceUsbDeviceManager *m = spice_usb_device_manager_get(session, NULL);
>          if (m)
> -            g_object_set(m, "auto-connect-filter", usbredir_filter, NULL);
> +            g_object_set(m, "auto-connect-filter",
> +                         usbredir_auto_redirect_filter, NULL);
>      }
>      if (disable_usbredir)
>          g_object_set(session, "enable-usbredir", FALSE, NULL);
> -- 
> 1.7.12
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: pgpkRmYbGhS31.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]