From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhA0P-0002v7-By for qemu-devel@nongnu.org; Mon, 27 May 2013 22:51:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhA0J-000179-N5 for qemu-devel@nongnu.org; Mon, 27 May 2013 22:51:21 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:54690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhA0J-00016r-8U for qemu-devel@nongnu.org; Mon, 27 May 2013 22:51:15 -0400 Received: from m1.gw.fujitsu.co.jp (unknown [10.0.50.71]) by fgwmail6.fujitsu.co.jp (Postfix) with ESMTP id 61DE83EE0C2 for ; Tue, 28 May 2013 11:51:14 +0900 (JST) Received: from smail (m1 [127.0.0.1]) by outgoing.m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 560AA45DE55 for ; Tue, 28 May 2013 11:51:14 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (s1.gw.fujitsu.co.jp [10.0.50.91]) by m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 3FB921EF081 for ; Tue, 28 May 2013 11:51:14 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 31B3A1DB8046 for ; Tue, 28 May 2013 11:51:14 +0900 (JST) Received: from s01.fujitsu.com (s01.gw.fujitsu.co.jp [133.161.11.16]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id E13FB1DB8051 for ; Tue, 28 May 2013 11:51:13 +0900 (JST) Received: from s01.gw.fujitsu.co.jp (localhost [127.0.0.1]) by s01.fujitsu.com (Postfix) with ESMTP id C2571AC3AF for ; Tue, 28 May 2013 11:51:13 +0900 (JST) Received: from localhost.localdomain (unknown [10.167.226.41]) by s01.fujitsu.com (Postfix) with ESMTP id E7127AC3BD for ; Tue, 28 May 2013 11:51:12 +0900 (JST) From: qiaonuohan@cn.fujitsu.com Date: Tue, 28 May 2013 10:50:31 +0800 Message-Id: <1369709437-24969-4-git-send-email-qiaonuohan@cn.fujitsu.com> In-Reply-To: <1369709437-24969-1-git-send-email-qiaonuohan@cn.fujitsu.com> References: <1369709437-24969-1-git-send-email-qiaonuohan@cn.fujitsu.com> Subject: [Qemu-devel] [PATCH v4 3/9] dump: Move struct definition into dump_memroy.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: eblake@redhat.com, lcapitulino@redhat.com, afaerber@suse.de Cc: zhangxh@cn.fujitsu.com, kumagai-atsushi@mxc.nes.nec.co.jp, Qiao Nuohan , anderson@redhat.com, qemu-devel@nongnu.org From: Qiao Nuohan Move definition of struct DumpState into include/sysemu/dump_memory.h. Signed-off-by: Qiao Nuohan Reviewed-by: Zhang Xiaohe --- dump.c | 22 +--------------------- include/sysemu/dump_memory.h | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 21 deletions(-) create mode 100644 include/sysemu/dump_memory.h diff --git a/dump.c b/dump.c index c0d3da5..9ac66be 100644 --- a/dump.c +++ b/dump.c @@ -15,10 +15,9 @@ #include "elf.h" #include "cpu.h" #include "exec/cpu-all.h" -#include "exec/hwaddr.h" #include "monitor/monitor.h" #include "sysemu/kvm.h" -#include "sysemu/dump.h" +#include "sysemu/dump_memory.h" #include "sysemu/sysemu.h" #include "sysemu/memory_mapping.h" #include "qapi/error.h" @@ -57,25 +56,6 @@ static uint64_t cpu_convert_to_target64(uint64_t val, int endian) return val; } -typedef struct DumpState { - ArchDumpInfo dump_info; - MemoryMappingList list; - uint16_t phdr_num; - uint32_t sh_info; - bool have_section; - bool resume; - size_t note_size; - hwaddr memory_offset; - int fd; - - RAMBlock *block; - ram_addr_t start; - bool has_filter; - int64_t begin; - int64_t length; - Error **errp; -} DumpState; - static int dump_cleanup(DumpState *s) { int ret = 0; diff --git a/include/sysemu/dump_memory.h b/include/sysemu/dump_memory.h new file mode 100644 index 0000000..ce22c05 --- /dev/null +++ b/include/sysemu/dump_memory.h @@ -0,0 +1,40 @@ +/* + * QEMU dump memory + * + * Copyright (C) 2013 FUJITSU LIMITED + * + * Authors: + * Qiao Nuohan + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + * + */ + +#ifndef DUMP_MEMORY_H +#define DUMP_MEMORY_H + +#include "exec/cpu-all.h" +#include "sysemu/memory_mapping.h" +#include "sysemu/dump.h" + +typedef struct DumpState { + ArchDumpInfo dump_info; + MemoryMappingList list; + uint16_t phdr_num; + uint32_t sh_info; + bool have_section; + bool resume; + size_t note_size; + hwaddr memory_offset; + int fd; + + RAMBlock *block; + ram_addr_t start; + bool has_filter; + int64_t begin; + int64_t length; + Error **errp; +} DumpState; + +#endif -- 1.7.1