From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwanF-0002hq-Tu for qemu-devel@nongnu.org; Wed, 11 Nov 2015 14:10:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwanD-0006eY-8s for qemu-devel@nongnu.org; Wed, 11 Nov 2015 14:10:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwanD-0006eS-3n for qemu-devel@nongnu.org; Wed, 11 Nov 2015 14:10:51 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id B3E7519CB9D for ; Wed, 11 Nov 2015 19:10:50 +0000 (UTC) From: Eduardo Habkost Date: Wed, 11 Nov 2015 17:09:11 -0200 Message-Id: <1447268956-27500-8-git-send-email-ehabkost@redhat.com> In-Reply-To: <1447268956-27500-1-git-send-email-ehabkost@redhat.com> References: <1447268956-27500-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 07/12] stubs: spice initialization stubs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Gerd Hoffmann This reduces the number of CONFIG_SPICE #ifdefs in vl.c. Cc: Gerd Hoffmann Signed-off-by: Eduardo Habkost --- 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