[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 06/19] ui/vc: console-vc requires PIXMAN
From: |
marcandre . lureau |
Subject: |
[PATCH v5 06/19] ui/vc: console-vc requires PIXMAN |
Date: |
Mon, 23 Oct 2023 15:30:33 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Add stubs for the fallback paths.
get_vc() now returns NULL by default if !PIXMAN.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
ui/console-vc-stubs.c | 33 +++++++++++++++++++++++++++++++++
ui/console.c | 3 +++
ui/meson.build | 2 +-
3 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 ui/console-vc-stubs.c
diff --git a/ui/console-vc-stubs.c b/ui/console-vc-stubs.c
new file mode 100644
index 0000000000..2afc52329f
--- /dev/null
+++ b/ui/console-vc-stubs.c
@@ -0,0 +1,33 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ * QEMU VC stubs
+ */
+#include "qemu/osdep.h"
+
+#include "qapi/error.h"
+#include "qemu/error-report.h"
+#include "qemu/option.h"
+#include "chardev/char.h"
+#include "ui/console-priv.h"
+
+void qemu_text_console_select(QemuTextConsole *c)
+{
+}
+
+const char *
+qemu_text_console_get_label(QemuTextConsole *c)
+{
+ return NULL;
+}
+
+void qemu_text_console_update_cursor(void)
+{
+}
+
+void qemu_text_console_handle_keysym(QemuTextConsole *s, int keysym)
+{
+}
+
+void qemu_console_early_init(void)
+{
+}
diff --git a/ui/console.c b/ui/console.c
index a758ed62ad..a72c495b5a 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1685,8 +1685,11 @@ const char *qemu_display_get_vc(DisplayOptions *opts)
if (dpys[opts->type]->vc) {
return dpys[opts->type]->vc;
} else {
+#ifdef CONFIG_PIXMAN
return "vc:80Cx24C";
+#endif
}
+ return NULL;
}
void qemu_display_help(void)
diff --git a/ui/meson.build b/ui/meson.build
index 0a1e8272a3..3085e10a72 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -6,7 +6,6 @@ system_ss.add(png)
system_ss.add(files(
'clipboard.c',
'console.c',
- 'console-vc.c',
'cursor.c',
'input-keymap.c',
'input-legacy.c',
@@ -19,6 +18,7 @@ system_ss.add(files(
'ui-qmp-cmds.c',
'util.c',
))
+system_ss.add(when: pixman, if_true: files('console-vc.c'), if_false:
files('console-vc-stubs.c'))
if dbus_display
system_ss.add(files('dbus-module.c'))
endif
--
2.41.0
- Re: [PATCH v5 04/19] vl: move display early init before default devices, (continued)
[PATCH v5 02/19] ui: compile out some qemu-pixman functions when !PIXMAN, marcandre . lureau, 2023/10/23
[PATCH v5 03/19] ui: add pixman-compat.h, marcandre . lureau, 2023/10/23
[PATCH v5 05/19] ui/console: allow to override the default VC, marcandre . lureau, 2023/10/23
[PATCH v5 07/19] qmp/hmp: disable screendump if PIXMAN is missing, marcandre . lureau, 2023/10/23
[PATCH v5 06/19] ui/vc: console-vc requires PIXMAN,
marcandre . lureau <=
[PATCH v5 09/19] ui/console: when PIXMAN is unavailable, don't draw placeholder msg, marcandre . lureau, 2023/10/23
[PATCH v5 08/19] virtio-gpu: replace PIXMAN for region/rect test, marcandre . lureau, 2023/10/23
[PATCH v5 10/19] vhost-user-gpu: skip VHOST_USER_GPU_UPDATE when !PIXMAN, marcandre . lureau, 2023/10/23
[PATCH v5 11/19] ui/gl: opengl doesn't require PIXMAN, marcandre . lureau, 2023/10/23
[PATCH v5 13/19] ui/spice: SPICE/QXL requires PIXMAN, marcandre . lureau, 2023/10/23
[PATCH v5 12/19] ui/vnc: VNC requires PIXMAN, marcandre . lureau, 2023/10/23