aboutsummaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-06-07 08:48:09 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-06-07 09:19:31 +0200
commit4720bd050655a56b4b048d8856a03ae187481a7f (patch)
tree4bcb80b056b08a1282bff2a1177957fc4cc5ab74 /dump.c
parentdb2077692ffee1f87a1f4af0cf275c33aba6c867 (diff)
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 <pbonzini@redhat.com>
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c9
1 files changed, 7 insertions, 2 deletions
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) +