From: Marc-André Lureau <marcandre.lureau@redhat.com>
Add stubs for the fallback paths.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
ui/console-vc-stubs.c | 32 ++++++++++++++++++++++++++++++++
ui/console.c | 4 ++++
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..0827961b2b
--- /dev/null
+++ b/ui/console-vc-stubs.c
@@ -0,0 +1,32 @@
+/*
+ * 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 a38d24f075..8b5c40ddd7 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1687,7 +1687,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";
+#else
+ return "null";
+#endif
}
}
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