[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH -V4 RESEND 5/6] dump-guest-memory: Check for the corre
From: |
Aneesh Kumar K.V |
Subject: |
[Qemu-ppc] [PATCH -V4 RESEND 5/6] dump-guest-memory: Check for the correct return value |
Date: |
Tue, 1 Oct 2013 21:49:32 +0530 |
From: "Aneesh Kumar K.V" <address@hidden>
We should check for error with s->note_size
Signed-off-by: Aneesh Kumar K.V <address@hidden>
---
dump.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dump.c b/dump.c
index 846155c..80a9116 100644
--- a/dump.c
+++ b/dump.c
@@ -66,7 +66,7 @@ typedef struct DumpState {
uint32_t sh_info;
bool have_section;
bool resume;
- size_t note_size;
+ ssize_t note_size;
hwaddr memory_offset;
int fd;
@@ -765,7 +765,7 @@ 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 (ret < 0) {
+ if (s->note_size < 0) {
error_set(errp, QERR_UNSUPPORTED);
goto cleanup;
}
--
1.8.1.2
- [Qemu-ppc] [PATCH -V4 RESEND 0/6] target-ppc: Add support for dumping guest memory using qemu gdb server, Aneesh Kumar K.V, 2013/10/01
- [Qemu-ppc] [PATCH -V4 RESEND 4/6] target-ppc: Use #define for max slb entries, Aneesh Kumar K.V, 2013/10/01
- [Qemu-ppc] [PATCH -V4 RESEND 6/6] target-ppc: dump-guest-memory support, Aneesh Kumar K.V, 2013/10/01
- [Qemu-ppc] [PATCH -V4 RESEND 5/6] dump-guest-memory: Check for the correct return value,
Aneesh Kumar K.V <=
- [Qemu-ppc] [PATCH -V4 RESEND 2/6] target-ppc: Fix page table lookup with kvm enabled, Aneesh Kumar K.V, 2013/10/01
- [Qemu-ppc] [PATCH -V4 RESEND 3/6] target-ppc: Check for error on address translation in memsave command, Aneesh Kumar K.V, 2013/10/01
- [Qemu-ppc] [PATCH -V4 RESEND 1/6] target-ppc: Update slb array with correct index values., Aneesh Kumar K.V, 2013/10/01
- Re: [Qemu-ppc] [PATCH -V4 RESEND 0/6] target-ppc: Add support for dumping guest memory using qemu gdb server, Alexander Graf, 2013/10/02