|
|
9ae3a8 |
From 4e72a97c81c6fe61fe051bfe41e9b53425bcd7af Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
Date: Fri, 7 Nov 2014 17:17:50 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 03/41] dump: const-qualify the buf of WriteCoreDumpFunction
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Message-id: <1415380693-16593-4-git-send-email-lersek@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 62189
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.1 qemu-kvm PATCH 03/26] dump: const-qualify the buf of WriteCoreDumpFunction
|
|
|
9ae3a8 |
Bugzilla: 1157798
|
|
|
9ae3a8 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: dgibson <dgibson@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: qiaonuohan <qiaonuohan@cn.fujitsu.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
WriteCoreDumpFunction is a function pointer that points to the function used to
|
|
|
9ae3a8 |
write content in "buf" into core file, so "buf" should be const-qualify.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
|
|
|
9ae3a8 |
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit b5ba1cc6260917926781fb79fbb05d53bf586d53)
|
|
|
9ae3a8 |
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
dump.c | 2 +-
|
|
|
9ae3a8 |
include/qom/cpu.h | 3 ++-
|
|
|
9ae3a8 |
2 files changed, 3 insertions(+), 2 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/dump.c b/dump.c
|
|
|
9ae3a8 |
index 8c31386..aa56aba 100644
|
|
|
9ae3a8 |
--- a/dump.c
|
|
|
9ae3a8 |
+++ b/dump.c
|
|
|
9ae3a8 |
@@ -99,7 +99,7 @@ static void dump_error(DumpState *s, const char *reason)
|
|
|
9ae3a8 |
dump_cleanup(s);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
-static int fd_write_vmcore(void *buf, size_t size, void *opaque)
|
|
|
9ae3a8 |
+static int fd_write_vmcore(const void *buf, size_t size, void *opaque)
|
|
|
9ae3a8 |
{
|
|
|
9ae3a8 |
DumpState *s = opaque;
|
|
|
9ae3a8 |
size_t written_size;
|
|
|
9ae3a8 |
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
|
|
|
9ae3a8 |
index b555c22..a5cc6c3 100644
|
|
|
9ae3a8 |
--- a/include/qom/cpu.h
|
|
|
9ae3a8 |
+++ b/include/qom/cpu.h
|
|
|
9ae3a8 |
@@ -25,7 +25,8 @@
|
|
|
9ae3a8 |
#include "qemu/thread.h"
|
|
|
9ae3a8 |
#include "qemu/typedefs.h"
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
-typedef int (*WriteCoreDumpFunction)(void *buf, size_t size, void *opaque);
|
|
|
9ae3a8 |
+typedef int (*WriteCoreDumpFunction)(const void *buf, size_t size,
|
|
|
9ae3a8 |
+ void *opaque);
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
/**
|
|
|
9ae3a8 |
* SECTION:cpu
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|