From: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
To: stefanha@gmail.com, lcapitulino@redhat.com, afaerber@suse.de,
eblake@redhat.com
Cc: qemu-devel@nongnu.org, qiaonuohan@cn.fujitsu.com,
kumagai-atsushi@mxc.nes.nec.co.jp, anderson@redhat.com,
akong@redhat.com, lersek@redhat.com
Subject: [Qemu-devel] [PATCH v6 01/11] dump: Add argument to write_elfxx_notes
Date: Sun, 5 Jan 2014 15:27:34 +0800 [thread overview]
Message-ID: <1388906864-1083-2-git-send-email-qiaonuohan@cn.fujitsu.com> (raw)
In-Reply-To: <1388906864-1083-1-git-send-email-qiaonuohan@cn.fujitsu.com>
write_elf32_notes/wirte_elf64_notes use fd_write_vmcore to write elf notes to
vmcore. Adding parameter "WriteCoreDumpFunction f" makes it available to choose
the method of writing elf notes
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
---
dump.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dump.c b/dump.c
index 80a9116..1fa12a2 100644
--- a/dump.c
+++ b/dump.c
@@ -271,7 +271,7 @@ static inline int cpu_index(CPUState *cpu)
return cpu->cpu_index + 1;
}
-static int write_elf64_notes(DumpState *s)
+static int write_elf64_notes(WriteCoreDumpFunction f, DumpState *s)
{
CPUState *cpu;
int ret;
@@ -279,7 +279,7 @@ static int write_elf64_notes(DumpState *s)
CPU_FOREACH(cpu) {
id = cpu_index(cpu);
- ret = cpu_write_elf64_note(fd_write_vmcore, cpu, id, s);
+ ret = cpu_write_elf64_note(f, cpu, id, s);
if (ret < 0) {
dump_error(s, "dump: failed to write elf notes.\n");
return -1;
@@ -287,7 +287,7 @@ static int write_elf64_notes(DumpState *s)
}
CPU_FOREACH(cpu) {
- ret = cpu_write_elf64_qemunote(fd_write_vmcore, cpu, s);
+ ret = cpu_write_elf64_qemunote(f, cpu, s);
if (ret < 0) {
dump_error(s, "dump: failed to write CPU status.\n");
return -1;
@@ -321,7 +321,7 @@ static int write_elf32_note(DumpState *s)
return 0;
}
-static int write_elf32_notes(DumpState *s)
+static int write_elf32_notes(WriteCoreDumpFunction f, DumpState *s)
{
CPUState *cpu;
int ret;
@@ -329,7 +329,7 @@ static int write_elf32_notes(DumpState *s)
CPU_FOREACH(cpu) {
id = cpu_index(cpu);
- ret = cpu_write_elf32_note(fd_write_vmcore, cpu, id, s);
+ ret = cpu_write_elf32_note(f, cpu, id, s);
if (ret < 0) {
dump_error(s, "dump: failed to write elf notes.\n");
return -1;
@@ -337,7 +337,7 @@ static int write_elf32_notes(DumpState *s)
}
CPU_FOREACH(cpu) {
- ret = cpu_write_elf32_qemunote(fd_write_vmcore, cpu, s);
+ ret = cpu_write_elf32_qemunote(f, cpu, s);
if (ret < 0) {
dump_error(s, "dump: failed to write CPU status.\n");
return -1;
@@ -574,7 +574,7 @@ static int dump_begin(DumpState *s)
}
/* write notes to vmcore */
- if (write_elf64_notes(s) < 0) {
+ if (write_elf64_notes(fd_write_vmcore, s) < 0) {
return -1;
}
@@ -597,7 +597,7 @@ static int dump_begin(DumpState *s)
}
/* write notes to vmcore */
- if (write_elf32_notes(s) < 0) {
+ if (write_elf32_notes(fd_write_vmcore, s) < 0) {
return -1;
}
}
--
1.7.1
next prev parent reply other threads:[~2014-01-05 8:27 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-05 7:27 [Qemu-devel] [PATCH v6 00/11] Make 'dump-guest-memory' dump in kdump-compressed format Qiao Nuohan
2014-01-05 7:27 ` Qiao Nuohan [this message]
2014-01-06 17:03 ` [Qemu-devel] [PATCH v6 01/11] dump: Add argument to write_elfxx_notes Laszlo Ersek
2014-01-07 6:00 ` Qiao Nuohan
2014-01-05 7:27 ` [Qemu-devel] [PATCH v6 02/11] dump: Add API to write header of flatten format Qiao Nuohan
2014-01-06 17:15 ` Laszlo Ersek
2014-01-05 7:27 ` [Qemu-devel] [PATCH v6 03/11] dump: Add API to write vmcore Qiao Nuohan
2014-01-06 18:12 ` Laszlo Ersek
2014-01-07 6:15 ` Qiao Nuohan
2014-01-05 7:27 ` [Qemu-devel] [PATCH v6 04/11] dump: Add API to write elf notes to buffer Qiao Nuohan
2014-01-06 18:46 ` Laszlo Ersek
2014-01-07 6:17 ` Qiao Nuohan
2014-01-05 7:27 ` [Qemu-devel] [PATCH v6 05/11] dump: add support for lzo/snappy Qiao Nuohan
2014-01-06 19:25 ` Laszlo Ersek
2014-01-07 6:25 ` Qiao Nuohan
2014-01-07 7:24 ` Laszlo Ersek
2014-01-05 7:27 ` [Qemu-devel] [PATCH v6 06/11] dump: add API to write dump header Qiao Nuohan
2014-01-07 11:38 ` Laszlo Ersek
2014-01-07 11:49 ` Andreas Färber
2014-01-13 10:03 ` Qiao Nuohan
2014-01-13 10:39 ` Laszlo Ersek
2014-01-14 2:07 ` Qiao Nuohan
2014-01-14 2:29 ` Laszlo Ersek
2014-01-14 2:42 ` Qiao Nuohan
2014-01-05 7:27 ` [Qemu-devel] [PATCH v6 07/11] dump: Add API to write dump_bitmap Qiao Nuohan
2014-01-07 14:49 ` Laszlo Ersek
2014-01-07 21:41 ` Laszlo Ersek
2014-01-05 7:27 ` [Qemu-devel] [PATCH v6 08/11] dump: Add APIs to operate DataCache Qiao Nuohan
2014-01-07 15:22 ` Laszlo Ersek
2014-01-05 7:27 ` [Qemu-devel] [PATCH v6 09/11] dump: Add API to write dump pages Qiao Nuohan
2014-01-07 22:37 ` Laszlo Ersek
2014-01-07 23:12 ` Eric Blake
2014-01-05 7:27 ` [Qemu-devel] [PATCH v6 10/11] dump: Make kdump-compressed format available for 'dump-guest-memory' Qiao Nuohan
2014-01-09 15:46 ` Laszlo Ersek
2014-01-05 7:27 ` [Qemu-devel] [PATCH v6 11/11] Add 'query-dump-guest-memory-capability' command Qiao Nuohan
2014-01-09 16:34 ` Laszlo Ersek
2014-01-07 6:32 ` [Qemu-devel] [PATCH v6 00/11] Make 'dump-guest-memory' dump in kdump-compressed format Qiao Nuohan
2014-01-07 7:27 ` Laszlo Ersek
2014-01-07 7:30 ` Qiao Nuohan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1388906864-1083-2-git-send-email-qiaonuohan@cn.fujitsu.com \
--to=qiaonuohan@cn.fujitsu.com \
--cc=afaerber@suse.de \
--cc=akong@redhat.com \
--cc=anderson@redhat.com \
--cc=eblake@redhat.com \
--cc=kumagai-atsushi@mxc.nes.nec.co.jp \
--cc=lcapitulino@redhat.com \
--cc=lersek@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).