From 927d66381948659b0acbb1b3f23de5a5008d48a4 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Tue, 18 Apr 2017 18:12:35 +0200 Subject: migration: Pass Error ** argument to {save,load}_vmstate This way we use the "normal" way of printing errors for hmp commands. Signed-off-by: Juan Quintela Suggested-by: Paolo Bonzini Reviewed-by: Peter Xu Reviewed-by: Laurent Vivier --- vl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vl.c') diff --git a/vl.c b/vl.c index 5c9b40eb1c..1512df6e9e 100644 --- a/vl.c +++ b/vl.c @@ -4701,7 +4701,9 @@ int main(int argc, char **argv, char **envp) if (replay_mode != REPLAY_MODE_NONE) { replay_vmstate_init(); } else if (loadvm) { - if (load_vmstate(loadvm) < 0) { + Error *local_err = NULL; + if (load_vmstate(loadvm, &local_err) < 0) { + error_report_err(local_err); autostart = 0; } } -- cgit v1.2.3