From patchwork Wed May 8 02:12:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qiao Nuohan X-Patchwork-Id: 243247 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9A7282C0097 for ; Mon, 13 May 2013 13:02:31 +1000 (EST) Received: from localhost ([::1]:41489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ubj1x-0000So-Pp for incoming@patchwork.ozlabs.org; Sun, 12 May 2013 23:02:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ubj1W-0000OO-ED for qemu-devel@nongnu.org; Sun, 12 May 2013 23:02:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ubj1S-000611-22 for qemu-devel@nongnu.org; Sun, 12 May 2013 23:02:02 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:53642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ubj1R-00060X-Jv for qemu-devel@nongnu.org; Sun, 12 May 2013 23:01:58 -0400 Received: from m1.gw.fujitsu.co.jp (unknown [10.0.50.71]) by fgwmail6.fujitsu.co.jp (Postfix) with ESMTP id 9DB283EE0BB for ; Mon, 13 May 2013 12:01:55 +0900 (JST) Received: from smail (m1 [127.0.0.1]) by outgoing.m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 61E732C69C7 for ; Mon, 13 May 2013 12:01:55 +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 3F5411EF081 for ; Mon, 13 May 2013 12:01:55 +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 1E2011DB8058 for ; Mon, 13 May 2013 12:01:55 +0900 (JST) Received: from s00.fujitsu.com (s00.gw.fujitsu.co.jp [133.161.11.15]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id CCBE81DB8055 for ; Mon, 13 May 2013 12:01:54 +0900 (JST) Received: from s00.gw.fujitsu.co.jp (localhost [127.0.0.1]) by s00.fujitsu.com (Postfix) with ESMTP id DB1A2AC3F1 for ; Mon, 13 May 2013 12:01:51 +0900 (JST) Received: from localhost.localdomain (unknown [10.167.226.120]) by s00.fujitsu.com (Postfix) with ESMTP id 81736AC295 for ; Mon, 13 May 2013 12:01:25 +0900 (JST) Received: by localhost.localdomain (Postfix, from userid 0) id AEFCDE13A1; Wed, 8 May 2013 10:13:45 +0800 (CST) From: qiaonuohan@cn.fujitsu.com To: qemu-devel@nongnu.org Date: Wed, 8 May 2013 10:12:55 +0800 Message-Id: <1367979181-24679-4-git-send-email-qiaonuohan@cn.fujitsu.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1367979181-24679-1-git-send-email-qiaonuohan@cn.fujitsu.com> References: <1367979181-24679-1-git-send-email-qiaonuohan@cn.fujitsu.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 192.51.44.36 Cc: Qiao Nuohan , d.hatayama@jp.fujitsu.com, zhangxh@cn.fujitsu.com, anderson@redhat.com, kumagai-atsushi@mxc.nes.nec.co.jp, afaerber@suse.de Subject: [Qemu-devel] [PATCH 3/9 v2] Move includes and struct definition to dump.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Qiao Nuohan Move includes and definition of struct DumpState into include/sysemu/dump.h. Signed-off-by: Qiao Nuohan Reviewed-by: Zhang Xiaohe --- dump.c | 29 ----------------------------- include/sysemu/dump.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/dump.c b/dump.c index c0d3da5..705c978 100644 --- a/dump.c +++ b/dump.c @@ -12,17 +12,7 @@ */ #include "qemu-common.h" -#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/sysemu.h" -#include "sysemu/memory_mapping.h" -#include "qapi/error.h" -#include "qmp-commands.h" static uint16_t cpu_convert_to_target16(uint16_t val, int endian) { @@ -57,25 +47,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.h b/include/sysemu/dump.h index b8c770f..b41469a 100644 --- a/include/sysemu/dump.h +++ b/include/sysemu/dump.h @@ -14,12 +14,42 @@ #ifndef DUMP_H #define DUMP_H +#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/sysemu.h" +#include "sysemu/memory_mapping.h" +#include "qapi/error.h" +#include "qmp-commands.h" + typedef struct ArchDumpInfo { int d_machine; /* Architecture */ int d_endian; /* ELFDATA2LSB or ELFDATA2MSB */ int d_class; /* ELFCLASS32 or ELFCLASS64 */ } ArchDumpInfo; +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; + int cpu_get_dump_info(ArchDumpInfo *info); ssize_t cpu_get_note_size(int class, int machine, int nr_cpus);