[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 03/97] vmstate: return error in case of error
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 03/97] vmstate: return error in case of error |
Date: |
Mon, 7 Apr 2014 05:20:21 +0200 |
If there is an error while loading a field, we should stop reading and
not continue with the rest of fields.
Signed-off-by: Juan Quintela <address@hidden>
---
vmstate.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/vmstate.c b/vmstate.c
index bfa34cc..d82cccf 100644
--- a/vmstate.c
+++ b/vmstate.c
@@ -74,6 +74,9 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription
*vmsd,
ret = field->info->get(f, addr, size);
}
+ if (ret >= 0) {
+ ret = qemu_file_get_error(f);
+ }
if (ret < 0) {
trace_vmstate_load_field_error(field->name, ret);
return ret;
--
1.9.0
- [Qemu-devel] [PATCH for 2.1 00/97] VMState simplification (massive), Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 01/97] savevm: Ignore minimum_version_id_old if there is no load_state_old, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 03/97] vmstate: return error in case of error,
Juan Quintela <=
- [Qemu-devel] [PATCH 05/97] vmstate: refactor opening of files, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 07/97] vmstate: create test functions for versions until 15, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 04/97] vmstate: reduce code duplication, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 06/97] vmstate: Refactor & increase tests for primitive types, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 08/97] vmstate: Remove VMSTATE_UINTL_EQUAL_V, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 09/97] vmstate: Change VMSTATE_INTTL_V to VMSTATE_INTTL_TEST, Juan Quintela, 2014/04/06
- [Qemu-devel] [PATCH 10/97] vmstate: Remove unused VMSTATE_UINTTL_ARRAY_V, Juan Quintela, 2014/04/06