qemu-options: Remove the deprecated -no-quit option
PATCH 1/1 qemu-options: Remove the deprecated -no-quit option
This option was just a wrapper around the -display ...,window-close=off parameter, and the name "no-quit" is rather confusing compared to "window-close" (since there are still other means to quit the emulator), so let's remove this now.
--- docs/about/deprecated.rst | 6 ------ docs/about/removed-features.rst | 7 +++++++ qemu-options.hx | 8 -------- softmmu/vl.c | 8 +------- 4 files changed, 8 insertions(+), 21 deletions(-)
docs/about/deprecated.rst +0 -6
@@ -134,12 +134,6 @@ specified. Use ``-display sdl,window-close=...`` instead (i.e. with a minus instead of an underscore between "window" and "close"). -``-no-quit`` (since 6.1) -'''''''''''''''''''''''' - -The ``-no-quit`` is a synonym for ``-display ...,window-close=off`` which -should be used instead. - ``-alt-grab`` and ``-display sdl,alt_grab=on`` (since 6.2) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
docs/about/removed-features.rst +7 -0
@@ -330,6 +330,13 @@ RISC-V firmware not booted by default (removed in 5.1) QEMU 5.1 changes the default behaviour from ``-bios none`` to ``-bios default`` for the RISC-V ``virt`` machine and ``sifive_u`` machine. +``-no-quit`` (removed in 7.0) +''''''''''''''''''''''''''''' + +The ``-no-quit`` was a synonym for ``-display ...,window-close=off`` which +should be used instead. + + QEMU Machine Protocol (QMP) commands ------------------------------------
qemu-options.hx +0 -8
@@ -2002,14 +2002,6 @@ SRST ``-display sdl,grab-mod=rctrl`` instead. ERST -DEF("no-quit", 0, QEMU_OPTION_no_quit, - "-no-quit disable SDL/GTK window close capability (deprecated)\n", QEMU_ARCH_ALL) -SRST -``-no-quit`` - Disable window close capability (SDL and GTK only). This option is - deprecated, please use ``-display ...,window-close=off`` instead. -ERST - DEF("sdl", 0, QEMU_OPTION_sdl, "-sdl shorthand for -display sdl\n", QEMU_ARCH_ALL) SRST
softmmu/vl.c +1 -7
@@ -1938,7 +1938,7 @@ static void qemu_create_early_backends(void) "for SDL, ignoring option"); }if (dpy.has_window_close && !use_gtk && !use_sdl) { -error_report ("-no-quit is only valid for GTK and SDL, " +error_report ("window-close is only valid for GTK and SDL, " "ignoring option" ); }
@@ -3298,12 +3298,6 @@ void qemu_init(int argc, char **argv, char **envp)warn_report ("-ctrl-grab is deprecated, please use " "-display sdl,grab-mod=rctrl instead." );break ; -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:warn_report ("-sdl is deprecated, use -display sdl instead." );#ifdef CONFIG_SDL
Signature · 1 line
2.27.0
Quoted 5 lines · Thomas Huth
This option was just a wrapper around the -display ...,window-close=off parameter, and the name "no-quit" is rather confusing compared to "window-close" (since there are still other means to quit the emulator), so let's remove this now.
Quoted 7 lines
Signed-off-by Thomas Huth <[email protected]>--- docs/about/deprecated.rst | 6 ------ docs/about/removed-features.rst | 7 +++++++ qemu-options.hx | 8 -------- softmmu/vl.c | 8 +------- 4 files changed, 8 insertions(+), 21 deletions(-)
Libvirt has never used it. So from my POV: ACK.
Michal
Quoted 72 lines · Thomas Huth
This option was just a wrapper around the -display ...,window-close=off parameter, and the name "no-quit" is rather confusing compared to "window-close" (since there are still other means to quit the emulator), so let's remove this now.
Signed-off-by Thomas Huth <[email protected]>--- docs/about/deprecated.rst | 6 ------ docs/about/removed-features.rst | 7 +++++++ qemu-options.hx | 8 -------- softmmu/vl.c | 8 +------- 4 files changed, 8 insertions(+), 21 deletions(-)docs/about/deprecated.rst +0
-6@@ -134,12 +134,6 @@ specified. Use ``-display sdl,window-close=...`` instead (i.e. with a minus instead of an underscore between "window" and "close"). -``-no-quit`` (since 6.1) -'''''''''''''''''''''''' - -The ``-no-quit`` is a synonym for ``-display ...,window-close=off`` which -should be used instead. - ``-alt-grab`` and ``-display sdl,alt_grab=on`` (since 6.2) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''docs/about/removed-features.rst +7
-0@@ -330,6 +330,13 @@ RISC-V firmware not booted by default (removed in 5.1) QEMU 5.1 changes the default behaviour from ``-bios none`` to ``-bios default`` for the RISC-V ``virt`` machine and ``sifive_u`` machine. +``-no-quit`` (removed in 7.0) +''''''''''''''''''''''''''''' + +The ``-no-quit`` was a synonym for ``-display ...,window-close=off`` which +should be used instead. + + QEMU Machine Protocol (QMP) commands ------------------------------------qemu-options.hx +0
-8@@ -2002,14 +2002,6 @@ SRST ``-display sdl,grab-mod=rctrl`` instead. ERST -DEF("no-quit", 0, QEMU_OPTION_no_quit, - "-no-quit disable SDL/GTK window close capability (deprecated)\n", QEMU_ARCH_ALL) -SRST -``-no-quit`` - Disable window close capability (SDL and GTK only). This option is - deprecated, please use ``-display ...,window-close=off`` instead. -ERST - DEF("sdl", 0, QEMU_OPTION_sdl, "-sdl shorthand for -display sdl\n", QEMU_ARCH_ALL) SRSTsoftmmu/vl.c +0
-0
softmmu/vl.c static void qemu_create_early_backends(void) · line 1944
Quoted 8 lines
softmmu/vl.c +1
-1@@ -1938,7 +1938,7 @@ static void qemu_create_early_backends(void) "for SDL, ignoring option"); }if (dpy.has_window_close && !use_gtk && !use_sdl) { -error_report ("-no-quit is only valid for GTK and SDL, " +error_report ("window-close is only valid for GTK and SDL, " "ignoring option" ); }
Bonus: the error message in now in terms of the non-deprecated interface. Suggest to mention this in the commit message.
Sadly, it lacks context:
qemu-system-x86_64: window-close is only valid for GTK and SDL, ignoring option
If we check in parse_display() instead, we should be able to get something like
qemu-system-x86_64: -display none,window-close=off: window-close is only valid for GTK and SDL, ignoring option
Funny: we get a different error with VNC:
qemu-system-x86_64: -display vnc=:0,window-close=off: Invalid parameter 'window-close'
That's because parse_display() uses separate parsers for SDL, VNC and the rest, and only SDL and the rest accept window-close.
Finally, why isn't this an error? Invalid configuration should be...
If we decide not to error out in this case, we should use warn_report() instead of error_report().
All this can be addressed on top.
softmmu/vl.c void qemu_init(int argc, char **argv, char **envp) · line 3303
Quoted 13 lines
softmmu/vl.c +0
-6@@ -3298,12 +3298,6 @@ void qemu_init(int argc, char **argv, char **envp)warn_report ("-ctrl-grab is deprecated, please use " "-display sdl,grab-mod=rctrl instead." );break ; -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:warn_report ("-sdl is deprecated, use -display sdl instead." );#ifdef CONFIG_SDL
Quoted 102 lines · Markus Armbruster
Quoted 72 lines · Thomas Huth
This option was just a wrapper around the -display ...,window-close=off parameter, and the name "no-quit" is rather confusing compared to "window-close" (since there are still other means to quit the emulator), so let's remove this now.
Signed-off-by Thomas Huth <[email protected]>--- docs/about/deprecated.rst | 6 ------ docs/about/removed-features.rst | 7 +++++++ qemu-options.hx | 8 -------- softmmu/vl.c | 8 +------- 4 files changed, 8 insertions(+), 21 deletions(-)docs/about/deprecated.rst +0
-6@@ -134,12 +134,6 @@ specified. Use ``-display sdl,window-close=...`` instead (i.e. with a minus instead of an underscore between "window" and "close"). -``-no-quit`` (since 6.1) -'''''''''''''''''''''''' - -The ``-no-quit`` is a synonym for ``-display ...,window-close=off`` which -should be used instead. - ``-alt-grab`` and ``-display sdl,alt_grab=on`` (since 6.2) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''docs/about/removed-features.rst +7
-0@@ -330,6 +330,13 @@ RISC-V firmware not booted by default (removed in 5.1) QEMU 5.1 changes the default behaviour from ``-bios none`` to ``-bios default`` for the RISC-V ``virt`` machine and ``sifive_u`` machine. +``-no-quit`` (removed in 7.0) +''''''''''''''''''''''''''''' + +The ``-no-quit`` was a synonym for ``-display ...,window-close=off`` which +should be used instead. + + QEMU Machine Protocol (QMP) commands ------------------------------------qemu-options.hx +0
-8@@ -2002,14 +2002,6 @@ SRST ``-display sdl,grab-mod=rctrl`` instead. ERST -DEF("no-quit", 0, QEMU_OPTION_no_quit, - "-no-quit disable SDL/GTK window close capability (deprecated)\n", QEMU_ARCH_ALL) -SRST -``-no-quit`` - Disable window close capability (SDL and GTK only). This option is - deprecated, please use ``-display ...,window-close=off`` instead. -ERST - DEF("sdl", 0, QEMU_OPTION_sdl, "-sdl shorthand for -display sdl\n", QEMU_ARCH_ALL) SRSTsoftmmu/vl.c +0
-0softmmu/vl.c static void qemu_create_early_backends(void) · line 1944
Quoted 8 lines
softmmu/vl.c +1
-1@@ -1938,7 +1938,7 @@ static void qemu_create_early_backends(void) "for SDL, ignoring option"); }if (dpy.has_window_close && !use_gtk && !use_sdl) { -error_report ("-no-quit is only valid for GTK and SDL, " +error_report ("window-close is only valid for GTK and SDL, " "ignoring option" ); }Bonus: the error message in now in terms of the non-deprecated interface. Suggest to mention this in the commit message.
Sadly, it lacks context:
qemu-system-x86_64: window-close is only valid for GTK and SDL, ignoring option
If we check in
parse_display()instead, we should be able to get something likeqemu-system-x86_64: -display none,window-close=off: window-close is only valid for GTK and SDL, ignoring option
Funny: we get a different error with VNC:
qemu-system-x86_64: -display vnc=:0,window-close=off: Invalid parameter 'window-close'
That's because
parse_display()uses separate parsers for SDL, VNC and the rest, and only SDL and the rest accept window-close.
Quoted 6 lines
Finally, why isn't this an error? Invalid configuration should be...
If we decide not to error out in this case, we should use
warn_report()instead oferror_report().All this can be addressed on top.
I'm planning to get this mess cleaned up in QEMU 7.1 - once the ugly SDL parameters with the underscore can finally be removed after their deprecation period is over. Then we can switch the SDL display to proper QAPI parsing and remove all the legacy cruft there.
Thomas