qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 07/12] stubs: spice initialization stubs


From: Eduardo Habkost
Subject: [Qemu-devel] [PATCH 07/12] stubs: spice initialization stubs
Date: Wed, 11 Nov 2015 17:09:11 -0200

This reduces the number of CONFIG_SPICE #ifdefs in vl.c.

Cc: Gerd Hoffmann <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
 stubs/spice.c | 13 +++++++++++++
 vl.c          |  4 ----
 2 files changed, 13 insertions(+), 4 deletions(-)
 create mode 100644 stubs/spice.c

diff --git a/stubs/spice.c b/stubs/spice.c
new file mode 100644
index 0000000..49994a5
--- /dev/null
+++ b/stubs/spice.c
@@ -0,0 +1,13 @@
+#include "qemu-common.h"
+#include "ui/console.h"
+
+void qemu_spice_display_init(void)
+{
+    /* This must never be called if CONFIG_SPICE is disabled */
+    error_report("spice support is disabled");
+    abort();
+}
+
+void qemu_spice_init(void)
+{
+}
diff --git a/vl.c b/vl.c
index d4191d6..57064ea 100644
--- a/vl.c
+++ b/vl.c
@@ -4386,10 +4386,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) {
@@ -4593,11 +4591,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.1.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]