All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: "Armbruster, Markus" <armbru@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH v2 3/3] softmmu/vl: Deprecate the -sdl and -curses option
Date: Tue, 31 Aug 2021 15:53:22 +0200	[thread overview]
Message-ID: <CABgObfb8GHK0F=GCmDtaB=RqZT9+JnG+RRfNK+4XQ-ofoOxumA@mail.gmail.com> (raw)
In-Reply-To: <20210825092023.81396-4-thuth@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2860 bytes --]

As an alternative, you may want to turn it into "-display sdl" rather than
poke at dpy. This isn't much more code, but it keeps the shortcut isolated
within a single "case". This follows a lot of recently cleaned up command
line parsing code such as -no-hpet, -enable-kvm, -smp etc.

In the end (spoiler alert for my upcoming KVM Forum presentation—slides are
already on sched.com :)) what really produces complexity is the lack of
isolation/modularity. As long as UI code doesn't care about command line
parsing, and command line parsing doesn't care about global variables from
all over the place, the cost of shortcuts is so small that it may tilt in
favor of keeping them.

Paolo

Il mer 25 ago 2021, 11:20 Thomas Huth <thuth@redhat.com> ha scritto:

> It's not that much complicated to type "-display sdl" or "-display curses",
> so we should not clutter our main option name space with such simple
> wrapper options and rather present the users with a concise interface
> instead. Thus let's deprecate the "-sdl" and "-curses" wrapper options now.
>
> Acked-by: Peter Krempa <pkrempa@redhat.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  docs/about/deprecated.rst | 10 ++++++++++
>  softmmu/vl.c              |  3 +++
>  2 files changed, 13 insertions(+)
>
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index 868eca0dd4..d5bec67a78 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -148,6 +148,16 @@ Use ``-display sdl,grab-mod=lshift-lctrl-lalt``
> instead.
>
>  Use ``-display sdl,grab-mod=rctrl`` instead.
>
> +``-sdl`` (since 6.2)
> +''''''''''''''''''''
> +
> +Use ``-display sdl`` instead.
> +
> +``-curses`` (since 6.2)
> +'''''''''''''''''''''''
> +
> +Use ``-display curses`` instead.
> +
>
>  QEMU Machine Protocol (QMP) commands
>  ------------------------------------
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index 613948ab46..bb59dbf0de 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -2897,6 +2897,8 @@ void qemu_init(int argc, char **argv, char **envp)
>                  dpy.type = DISPLAY_TYPE_NONE;
>                  break;
>              case QEMU_OPTION_curses:
> +                warn_report("-curses is deprecated, "
> +                            "use -display curses instead.");
>  #ifdef CONFIG_CURSES
>                  dpy.type = DISPLAY_TYPE_CURSES;
>  #else
> @@ -3270,6 +3272,7 @@ void qemu_init(int argc, char **argv, char **envp)
>                              "-display ...,window-close=off instead.");
>                  break;
>              case QEMU_OPTION_sdl:
> +                warn_report("-sdl is deprecated, use -display sdl
> instead.");
>  #ifdef CONFIG_SDL
>                  dpy.type = DISPLAY_TYPE_SDL;
>                  break;
> --
> 2.27.0
>
>

[-- Attachment #2: Type: text/html, Size: 3915 bytes --]

  reply	other threads:[~2021-08-31 13:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25  9:20 [PATCH v2 0/3] softmmu/vl: Deprecate old and crufty display ui options Thomas Huth
2021-08-25  9:20 ` [PATCH v2 1/3] softmmu/vl: Add a "grab-mod" parameter to the -display sdl option Thomas Huth
2021-08-25  9:20 ` [PATCH v2 2/3] softmmu/vl: Deprecate the old grab options Thomas Huth
2021-08-31 13:54   ` Paolo Bonzini
2021-08-25  9:20 ` [PATCH v2 3/3] softmmu/vl: Deprecate the -sdl and -curses option Thomas Huth
2021-08-31 13:53   ` Paolo Bonzini [this message]
2021-09-02 10:51     ` Thomas Huth
2021-09-02 10:58       ` Daniel P. Berrangé
2021-09-02 11:21         ` Thomas Huth
2021-09-02 11:37         ` Markus Armbruster
2021-09-02 13:21         ` Gerd Hoffmann
2021-08-31 12:21 ` [PATCH v2 0/3] softmmu/vl: Deprecate old and crufty display ui options Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABgObfb8GHK0F=GCmDtaB=RqZT9+JnG+RRfNK+4XQ-ofoOxumA@mail.gmail.com' \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.