diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-06-07 08:48:09 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-06-07 09:19:31 +0200 |
commit | 4720bd050655a56b4b048d8856a03ae187481a7f (patch) | |
tree | 4bcb80b056b08a1282bff2a1177957fc4cc5ab74 /dump.c | |
parent | db2077692ffee1f87a1f4af0cf275c33aba6c867 (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.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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) + |