From fe80e7d53fa6cb0e8f26b76cf6c73acd7010290e Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Mon, 12 Aug 2013 15:59:31 +0200 Subject: dump: Move stubs into libqemustub.a RH-Author: Laszlo Ersek Message-id: <1376323180-12863-2-git-send-email-lersek@redhat.com> Patchwork-id: 53160 O-Subject: [RHEL-7 qemu-kvm PATCH 01/10] dump: Move stubs into libqemustub.a Bugzilla: 981582 RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Radim Krcmar RH-Acked-by: Miroslav Rezanina From: Andreas Färber This allows us to drop CONFIG_NO_CORE_DUMP with its indirect dependency on CONFIG_HAVE_CORE_DUMP. Acked-by: Paolo Bonzini Signed-off-by: Andreas Färber (cherry picked from commit 88f62c2b1deb466749e340a8a241975c509bd9b6) Signed-off-by: Laszlo Ersek Signed-off-by: Miroslav Rezanina diff --git a/Makefile.target b/Makefile.target index ce4391f..1cafb17 100644 --- a/Makefile.target +++ b/Makefile.target @@ -64,7 +64,6 @@ CONFIG_NO_PCI = $(if $(subst n,,$(CONFIG_PCI)),n,y) CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y) CONFIG_NO_XEN = $(if $(subst n,,$(CONFIG_XEN)),n,y) CONFIG_NO_GET_MEMORY_MAPPING = $(if $(subst n,,$(CONFIG_HAVE_GET_MEMORY_MAPPING)),n,y) -CONFIG_NO_CORE_DUMP = $(if $(subst n,,$(CONFIG_HAVE_CORE_DUMP)),n,y) ######################################################### # cpu emulator library @@ -114,7 +113,6 @@ obj-y += memory.o savevm.o cputlb.o obj-$(CONFIG_HAVE_GET_MEMORY_MAPPING) += memory_mapping.o obj-$(CONFIG_HAVE_CORE_DUMP) += dump.o obj-$(CONFIG_NO_GET_MEMORY_MAPPING) += memory_mapping-stub.o -obj-$(CONFIG_NO_CORE_DUMP) += dump-stub.o LIBS+=$(libs_softmmu) # xen support diff --git a/dump-stub.c b/dump-stub.c deleted file mode 100644 index b3f42cb..0000000 --- a/dump-stub.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * QEMU dump - * - * Copyright Fujitsu, Corp. 2011, 2012 - * - * Authors: - * Wen Congyang - * - * This work is licensed under the terms of the GNU GPL, version 2 or later. - * See the COPYING file in the top-level directory. - * - */ - -#include "qemu-common.h" -#include "sysemu/dump.h" -#include "qapi/qmp/qerror.h" -#include "qmp-commands.h" - -/* we need this function in hmp.c */ -void qmp_dump_guest_memory(bool paging, const char *file, bool has_begin, - int64_t begin, bool has_length, int64_t length, - Error **errp) -{ - error_set(errp, QERR_UNSUPPORTED); -} - -int cpu_get_dump_info(ArchDumpInfo *info) -{ - return -1; -} - -ssize_t cpu_get_note_size(int class, int machine, int nr_cpus) -{ - return -1; -} - diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index 03dff20..9b701b4 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -2,6 +2,7 @@ stub-obj-y += arch-query-cpu-def.o stub-obj-y += clock-warp.o stub-obj-y += cpu-get-clock.o stub-obj-y += cpu-get-icount.o +stub-obj-y += dump.o stub-obj-y += fdset-add-fd.o stub-obj-y += fdset-find-fd.o stub-obj-y += fdset-get-fd.o diff --git a/stubs/dump.c b/stubs/dump.c new file mode 100644 index 0000000..b3f42cb --- /dev/null +++ b/stubs/dump.c @@ -0,0 +1,36 @@ +/* + * QEMU dump + * + * Copyright Fujitsu, Corp. 2011, 2012 + * + * Authors: + * Wen Congyang + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + * + */ + +#include "qemu-common.h" +#include "sysemu/dump.h" +#include "qapi/qmp/qerror.h" +#include "qmp-commands.h" + +/* we need this function in hmp.c */ +void qmp_dump_guest_memory(bool paging, const char *file, bool has_begin, + int64_t begin, bool has_length, int64_t length, + Error **errp) +{ + error_set(errp, QERR_UNSUPPORTED); +} + +int cpu_get_dump_info(ArchDumpInfo *info) +{ + return -1; +} + +ssize_t cpu_get_note_size(int class, int machine, int nr_cpus) +{ + return -1; +} +