[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 3/5] ui/console: fix default VC when there are no display
|
From: |
marcandre . lureau |
|
Subject: |
[PULL 3/5] ui/console: fix default VC when there are no display |
|
Date: |
Tue, 21 Nov 2023 14:40:18 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
When display is "none", we may still have remote displays (I think it
would be simpler if VNC/Spice were regular display btw). Return the
default VC then, and set them up to fix a regression when using remote
display and it used the TTY instead.
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1989
Fixes: commit 1bec1cc0d ("ui/console: allow to override the default VC")
Reported-by: German Maglione <gmaglione@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
---
ui/console.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/ui/console.c b/ui/console.c
index 8e688d3569..7db921e3b7 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1679,19 +1679,17 @@ void qemu_display_init(DisplayState *ds, DisplayOptions
*opts)
const char *qemu_display_get_vc(DisplayOptions *opts)
{
- assert(opts->type < DISPLAY_TYPE__MAX);
- if (opts->type == DISPLAY_TYPE_NONE) {
- return NULL;
- }
- assert(dpys[opts->type] != NULL);
- if (dpys[opts->type]->vc) {
- return dpys[opts->type]->vc;
- } else {
#ifdef CONFIG_PIXMAN
- return "vc:80Cx24C";
+ const char *vc = "vc:80Cx24C";
+#else
+ const char *vc = NULL;
#endif
+
+ assert(opts->type < DISPLAY_TYPE__MAX);
+ if (dpys[opts->type] && dpys[opts->type]->vc) {
+ vc = dpys[opts->type]->vc;
}
- return NULL;
+ return vc;
}
void qemu_display_help(void)
--
2.42.0
- [PULL 3/5] ui/gtk-egl: apply scale factor when calculating window's dimension, (continued)
- [PULL 3/5] ui/gtk-egl: apply scale factor when calculating window's dimension, marcandre . lureau, 2023/11/07
- [PULL 2/5] ui/gtk-egl: Check EGLSurface before doing scanout, marcandre . lureau, 2023/11/07
- [PULL 5/5] ui: Replacing pointer in function, marcandre . lureau, 2023/11/07
- Re: [PULL 0/5] Ui patches, Stefan Hajnoczi, 2023/11/07
- Re: [PULL 0/5] Ui patches, Michael Tokarev, 2023/11/07
- [PULL 0/5] Ui patches, marcandre . lureau, 2023/11/21
- [PULL 1/5] vl: revert behaviour for -display none, marcandre . lureau, 2023/11/21
- [PULL 2/5] ui: use "vc" chardev for dbus, gtk & spice-app, marcandre . lureau, 2023/11/21
- [PULL 3/5] ui/console: fix default VC when there are no display,
marcandre . lureau <=
- [PULL 4/5] vl: add missing display_remote++, marcandre . lureau, 2023/11/21
- [PULL 5/5] ui/pixman-minimal.h: fix empty allocation, marcandre . lureau, 2023/11/21
- Re: [PULL 0/5] Ui patches, Stefan Hajnoczi, 2023/11/21