[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/21] spice: Initialization stubs on qemu-spice.h
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL 11/21] spice: Initialization stubs on qemu-spice.h |
Date: |
Fri, 20 May 2016 17:28:31 -0300 |
This reduces the number of CONFIG_SPICE #ifdefs in vl.c.
Cc: Gerd Hoffmann <address@hidden>
Reviewed-by: Gerd Hoffmann <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
include/ui/qemu-spice.h | 13 +++++++++++++
vl.c | 4 ----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
index aa24363..57ac91b 100644
--- a/include/ui/qemu-spice.h
+++ b/include/ui/qemu-spice.h
@@ -51,6 +51,8 @@ static inline CharDriverState *qemu_chr_open_spice_port(const
char *name)
#else /* CONFIG_SPICE */
+#include "qemu/error-report.h"
+
#define using_spice 0
#define spice_displays 0
static inline int qemu_spice_set_passwd(const char *passwd,
@@ -75,6 +77,17 @@ static inline int qemu_spice_display_add_client(int csock,
int skipauth,
return -1;
}
+static inline void qemu_spice_display_init(void)
+{
+ /* This must never be called if CONFIG_SPICE is disabled */
+ error_report("spice support is disabled");
+ abort();
+}
+
+static inline void qemu_spice_init(void)
+{
+}
+
#endif /* CONFIG_SPICE */
static inline bool qemu_using_spice(Error **errp)
diff --git a/vl.c b/vl.c
index 6e8d25e..8576556 100644
--- a/vl.c
+++ b/vl.c
@@ -4360,10 +4360,8 @@ int main(int argc, char **argv, char **envp)
os_set_line_buffering();
-#ifdef CONFIG_SPICE
/* spice needs the timers to be initialized by this point */
qemu_spice_init();
-#endif
cpu_ticks_init();
if (icount_opts) {
@@ -4564,11 +4562,9 @@ int main(int argc, char **argv, char **envp)
g_free(ret);
}
-#ifdef CONFIG_SPICE
if (using_spice) {
qemu_spice_display_init();
}
-#endif
if (foreach_device_config(DEV_GDB, gdbserver_start) < 0) {
exit(1);
--
2.5.5
- [Qemu-devel] [PULL 18/21] machine: add properties to compat_props incrementaly, (continued)
- [Qemu-devel] [PULL 18/21] machine: add properties to compat_props incrementaly, Eduardo Habkost, 2016/05/20
- [Qemu-devel] [PULL 21/21] Use &error_fatal when initializing crypto on qemu-{img, io, nbd}, Eduardo Habkost, 2016/05/20
- [Qemu-devel] [PULL 02/21] vl: Use exit(1) when requested VGA interface is unavailable, Eduardo Habkost, 2016/05/20
- [Qemu-devel] [PULL 01/21] pc-dimm: correct comment of MemoryHotplugState, Eduardo Habkost, 2016/05/20
- [Qemu-devel] [PULL 16/21] vl: Make display_remote a local variable, Eduardo Habkost, 2016/05/20
- [Qemu-devel] [PULL 03/21] vl: Table-based select_vgahw(), Eduardo Habkost, 2016/05/20
- [Qemu-devel] [PULL 04/21] vl: Replace *_vga_available() functions with class_names field, Eduardo Habkost, 2016/05/20
- [Qemu-devel] [PULL 12/21] milkymist: Move DT_NOGRAPHIC check outside milkymist_tmu2_create(), Eduardo Habkost, 2016/05/20
- [Qemu-devel] [PULL 13/21] vl: Replace DT_NOGRAPHIC with machine option, Eduardo Habkost, 2016/05/20
- [Qemu-devel] [PULL 14/21] vl: Make display_type a local variable, Eduardo Habkost, 2016/05/20
- [Qemu-devel] [PULL 11/21] spice: Initialization stubs on qemu-spice.h,
Eduardo Habkost <=
- [Qemu-devel] [PULL 05/21] vl: Add DT_COCOA DisplayType value, Eduardo Habkost, 2016/05/20
- [Qemu-devel] [PULL 20/21] vl: Use &error_fatal when parsing monitor options, Eduardo Habkost, 2016/05/20
- [Qemu-devel] [PULL 06/21] vnc: Initialization stubs, Eduardo Habkost, 2016/05/20
- [Qemu-devel] [PULL 17/21] vl: Simplify global property registration, Eduardo Habkost, 2016/05/20
- [Qemu-devel] [PULL 15/21] vl: Move DisplayType typedef to vl.c, Eduardo Habkost, 2016/05/20
- [Qemu-devel] [PULL 10/21] gtk: Initialization stubs, Eduardo Habkost, 2016/05/20
- Re: [Qemu-devel] [PULL 00/21] Machine Core queue, 2016-05-20, Peter Maydell, 2016/05/23