Message ID | 1369709437-24969-4-git-send-email-qiaonuohan@cn.fujitsu.com |
---|---|
State | New |
Headers | show |
"dump_memory.h" Am 28.05.2013 04:50, schrieb qiaonuohan@cn.fujitsu.com: > From: Qiao Nuohan <qiaonuohan@cn.fujitsu.com> > > Move definition of struct DumpState into include/sysemu/dump_memory.h. > > Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com> > Reviewed-by: Zhang Xiaohe <zhangxh@cn.fujitsu.com> > --- > 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 <qiaonuohan@cn.fujitsu.com> I wondered whether you may want to keep Wen Congyang here as original dump.c author and the corresponding dump.c copyright - but since it's all Fujitsu that's none of my business. ;) Regards, Andreas > + * > + * 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 >
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 <qiaonuohan@cn.fujitsu.com> + * + * 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