Skip to contentSkip to conversation

ui/console: Display the 'none' backend in '-display help'

PATCH In review Philippe Mathieu-Daudé 3 participants 3 messages Jan 20, 2020 – Jan 21, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ui/console: Display the 'none' backend in '-display help'

Commit c388f408b5 added the possibility to list the display backends using '-display help'. Since the 'none' backend is is not implemented as a DisplayChangeListenerOps, it is not registered to the dpys[] array with qemu_display_register(), and is not listed in the help output.

This might be confusing, as we list it in the man page:

-display type
Select type of display to use. This option is a replacement for the old style -sdl/-curses/... options. Valid values for type are

none
Do not display video output. The guest will still see an emulated graphics card, but its output will not be displayed to the QEMU user. This option differs from the -nographic option in that it only affects what is done with video output; -nographic also changes the destination of the serial and parallel port data.

Fix by manually listing the special 'none' backend in the help.

---
 ui/console.c | 1 +
 1 file changed, 1 insertion(+)
ui/console.c +1 -0
index 69339b028b..179901c35e 100644
@@ -2338,6 +2338,7 @@ void qemu_display_help(void)
     int idx;
 
     printf("Available display backend types:\n");
+    printf("none\n");
     for (idx = DISPLAY_TYPE_NONE; idx < DISPLAY_TYPE__MAX; idx++) {
         if (!dpys[idx]) {
             ui_module_load_one(DisplayType_str(idx));
Signature · 1 line
2.21.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 20 lines · Philippe Mathieu-Daudé

Commit c388f408b5 added the possibility to list the display backends using '-display help'. Since the 'none' backend is is not implemented as a DisplayChangeListenerOps, it is not registered to the dpys[] array with qemu_display_register(), and is not listed in the help output.

This might be confusing, as we list it in the man page:

-display type
Select type of display to use. This option is a replacement for the old style -sdl/-curses/... options. Valid values for type are

none
Do not display video output. The guest will still see an emulated graphics card, but its output will not be displayed to the QEMU user. This option differs from the -nographic option in that it only affects what is done with video output; -nographic also changes the destination of the serial and parallel port data.

Quoted 7 lines

Fix by manually listing the special 'none' backend in the help.

---
  ui/console.c | 1 +
  1 file changed, 1 insertion(+)
Quoted 14 lines
ui/console.c +1 -0
index 69339b028b..179901c35e 100644
@@ -2338,6 +2338,7 @@ void qemu_display_help(void)
      int idx;
 
      printf("Available display backend types:\n");
+    printf("none\n");
      for (idx = DISPLAY_TYPE_NONE; idx < DISPLAY_TYPE__MAX; idx++) {
          if (!dpys[idx]) {
              ui_module_load_one(DisplayType_str(idx));
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 20 lines · Philippe Mathieu-Daudé

Commit c388f408b5 added the possibility to list the display backends using '-display help'. Since the 'none' backend is is not implemented as a DisplayChangeListenerOps, it is not registered to the dpys[] array with qemu_display_register(), and is not listed in the help output.

This might be confusing, as we list it in the man page:

-display type
Select type of display to use. This option is a replacement for the old style -sdl/-curses/... options. Valid values for type are

none
Do not display video output. The guest will still see an emulated graphics card, but its output will not be displayed to the QEMU user. This option differs from the -nographic option in that it only affects what is done with video output; -nographic also changes the destination of the serial and parallel port data.

Quoted 4 lines

Fix by manually listing the special 'none' backend in the help.

Added to ui queue.

thanks,
Gerd