Skip to content

Commit

Permalink
dump: const-qualify the buf of WriteCoreDumpFunction
Browse files Browse the repository at this point in the history
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 <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
  • Loading branch information
qiaonuohan authored and Luiz Capitulino committed Feb 28, 2014
1 parent fbb0621 commit b5ba1cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion include/qom/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b5ba1cc

Please sign in to comment.