aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-10-02 18:21:18 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-10-23 13:54:56 +0200
commit43eaae28e0394f8fb80848fb40aa5d28c6360321 (patch)
tree493754ef3c272334e9ddf10792a5413d2264ee3b /vl.c
parentf37afb5ab1921f42043b5527a517eef95c36acf8 (diff)
migration (incoming): add error propagation to fd and exec protocols
And remove the superfluous integer return value. Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/vl.c b/vl.c
index ee3c43ae2f..0597888449 100644
--- a/vl.c
+++ b/vl.c
@@ -3766,16 +3766,12 @@ int main(int argc, char **argv, char **envp)
}
if (incoming) {
- Error *errp = NULL;
- int ret = qemu_start_incoming_migration(incoming, &errp);
- if (ret < 0) {
- if (error_is_set(&errp)) {
- fprintf(stderr, "Migrate: %s\n", error_get_pretty(errp));
- error_free(errp);
- }
- fprintf(stderr, "Migration failed. Exit code %s(%d), exiting.\n",
- incoming, ret);
- exit(ret);
+ Error *local_err = NULL;
+ qemu_start_incoming_migration(incoming, &local_err);
+ if (local_err) {
+ fprintf(stderr, "-incoming %s: %s\n", incoming, error_get_pretty(local_err));
+ error_free(local_err);
+ exit(1);
}
} else if (autostart) {
vm_start();