qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v4 3/9] dump: Move struct definition into dump_memro


From: qiaonuohan
Subject: [Qemu-devel] [PATCH v4 3/9] dump: Move struct definition into dump_memroy.h
Date: Tue, 28 May 2013 10:50:31 +0800

From: Qiao Nuohan <address@hidden>

Move definition of struct DumpState into include/sysemu/dump_memory.h.

Signed-off-by: Qiao Nuohan <address@hidden>
Reviewed-by: Zhang Xiaohe <address@hidden>
---
 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 <address@hidden>
+ *
+ * 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]