qemu-devel
[Top][All Lists]
Advanced

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

[PATCH] ui: Mark the '-no-quit' option as deprecated


From: Thomas Huth
Subject: [PATCH] ui: Mark the '-no-quit' option as deprecated
Date: Wed, 30 Jun 2021 11:21:27 +0200

It's just a cumbersome wrapper around the -display ...,window_close=off
parameter, so we should rather tell our users to use that instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 docs/system/deprecated.rst | 6 ++++++
 qemu-options.hx            | 5 +++--
 softmmu/vl.c               | 2 ++
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index e2e0090878..c76da98761 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -126,6 +126,12 @@ other options have been processed.  This will either have 
no effect (if
 if they were not given.  The property is therefore useless and should not be
 specified.
 
+``-no-quit`` (since 6.1.0)
+''''''''''''''''''''''''''
+
+The ``-no-quit`` is a synonym for ``-display ...,window_close=off`` which
+should be used instead.
+
 
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
diff --git a/qemu-options.hx b/qemu-options.hx
index ba3ca9da1d..9fdd823c1b 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1910,10 +1910,11 @@ SRST
 ERST
 
 DEF("no-quit", 0, QEMU_OPTION_no_quit,
-    "-no-quit        disable SDL window close capability\n", QEMU_ARCH_ALL)
+    "-no-quit        disable SDL window close capability (deprecated)\n", 
QEMU_ARCH_ALL)
 SRST
 ``-no-quit``
-    Disable SDL window close capability.
+    Disable SDL window close capability. This option is deprecated, please
+    use ``-display ...,window_close=off`` instead.
 ERST
 
 DEF("sdl", 0, QEMU_OPTION_sdl,
diff --git a/softmmu/vl.c b/softmmu/vl.c
index cee6339580..3f79b9c8a3 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3232,6 +3232,8 @@ void qemu_init(int argc, char **argv, char **envp)
             case QEMU_OPTION_no_quit:
                 dpy.has_window_close = true;
                 dpy.window_close = false;
+                warn_report("-no-quit is deprecated, please use "
+                            "-display ...,window_close=off instead.");
                 break;
             case QEMU_OPTION_sdl:
 #ifdef CONFIG_SDL
-- 
2.27.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]