From 4720bd050655a56b4b048d8856a03ae187481a7f Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 7 Jun 2012 08:48:09 +0200 Subject: dump: change cpu_get_note_size to return ssize_t So that it can use the same prototype in both cases. Signed-off-by: Paolo Bonzini --- dump.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'dump.c') diff --git a/dump.c b/dump.c index 0ca14f87ed..b24d4be7a6 100644 --- a/dump.c +++ b/dump.c @@ -750,6 +750,13 @@ static int dump_init(DumpState *s, int fd, bool paging, bool has_filter, goto cleanup; } + s->note_size = cpu_get_note_size(s->dump_info.d_class, + s->dump_info.d_machine, nr_cpus); + if (ret < 0) { + error_set(errp, QERR_UNSUPPORTED); + goto cleanup; + } + /* get memory mapping */ memory_mapping_list_init(&s->list); if (paging) { @@ -784,8 +791,6 @@ static int dump_init(DumpState *s, int fd, bool paging, bool has_filter, } } - s->note_size = cpu_get_note_size(s->dump_info.d_class, - s->dump_info.d_machine, nr_cpus); if (s->dump_info.d_class == ELFCLASS64) { if (s->have_section) { s->memory_offset = sizeof(Elf64_Ehdr) + -- cgit v1.2.1