[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v8 01/13] dump: const-qualify the buf of WriteCoreDu
From: |
qiaonuohan |
Subject: |
[Qemu-devel] [PATCH v8 01/13] dump: const-qualify the buf of WriteCoreDumpFunction |
Date: |
Tue, 28 Jan 2014 14:21:54 +0800 |
WriteCoreDumpFunction is a function pointer that points to the function used to
write content in "buf" into core file, so "buf" should be const-qualify.
Signed-off-by: Qiao Nuohan <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
---
dump.c | 2 +-
include/qom/cpu.h | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dump.c b/dump.c
index 80a9116..42622de 100644
--- a/dump.c
+++ b/dump.c
@@ -99,7 +99,7 @@ static void dump_error(DumpState *s, const char *reason)
dump_cleanup(s);
}
-static int fd_write_vmcore(void *buf, size_t size, void *opaque)
+static int fd_write_vmcore(const void *buf, size_t size, void *opaque)
{
DumpState *s = opaque;
size_t written_size;
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 7739e00..57b4164 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -28,7 +28,8 @@
#include "qemu/tls.h"
#include "qemu/typedefs.h"
-typedef int (*WriteCoreDumpFunction)(void *buf, size_t size, void *opaque);
+typedef int (*WriteCoreDumpFunction)(const void *buf, size_t size,
+ void *opaque);
/**
* vaddr:
--
1.7.1
[Qemu-devel] [PATCH v8 04/13] dump: add API to write vmcore, qiaonuohan, 2014/01/28
[Qemu-devel] [PATCH v8 01/13] dump: const-qualify the buf of WriteCoreDumpFunction,
qiaonuohan <=
[Qemu-devel] [PATCH v8 07/13] dump: add members to DumpState and init some of them, qiaonuohan, 2014/01/28
[Qemu-devel] [PATCH v8 05/13] dump: add API to write elf notes to buffer, qiaonuohan, 2014/01/28
Re: [Qemu-devel] [PATCH v8 00/13] Make 'dump-guest-memory' dump in kdump-compressed format, Qiao Nuohan, 2014/01/28
Re: [Qemu-devel] [PATCH v8 00/13] Make 'dump-guest-memory' dump in kdump-compressed format, Laszlo Ersek, 2014/01/29
[Qemu-devel] [PATCH] Define the architecture for compressed dump format., Ekaterina Tumanova, 2014/01/30