aboutsummaryrefslogtreecommitdiff
path: root/vmstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'vmstate.c')
-rw-r--r--vmstate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vmstate.c b/vmstate.c
index b5882fae67..c9965205df 100644
--- a/vmstate.c
+++ b/vmstate.c
@@ -98,7 +98,11 @@ 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) {
+ qemu_file_set_error(f, ret);
trace_vmstate_load_field_error(field->name, ret);
return ret;
}