aboutsummaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2010-06-09 14:10:54 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-06-22 15:15:51 -0500
commit8ca5e8011857fc59074f342bec1e8ee69410e522 (patch)
tree3fc85cd2ef6c03718f58cdd1e2900ccd26dd1126 /migration.c
parent63729c36924348e494d69adbbdec6fdda339b76b (diff)
Exit if incoming migration fails
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/migration.c b/migration.c
index 64ed36e5e6..85c81e0983 100644
--- a/migration.c
+++ b/migration.c
@@ -36,22 +36,26 @@ static uint32_t max_throttle = (32 << 20);
static MigrationState *current_migration;
-void qemu_start_incoming_migration(const char *uri)
+int qemu_start_incoming_migration(const char *uri)
{
const char *p;
+ int ret;
if (strstart(uri, "tcp:", &p))
- tcp_start_incoming_migration(p);
+ ret = tcp_start_incoming_migration(p);
#if !defined(WIN32)
else if (strstart(uri, "exec:", &p))
- exec_start_incoming_migration(p);
+ ret = exec_start_incoming_migration(p);
else if (strstart(uri, "unix:", &p))
- unix_start_incoming_migration(p);
+ ret = unix_start_incoming_migration(p);
else if (strstart(uri, "fd:", &p))
- fd_start_incoming_migration(p);
+ ret = fd_start_incoming_migration(p);
#endif
- else
+ else {
fprintf(stderr, "unknown migration protocol: %s\n", uri);
+ ret = -EPROTONOSUPPORT;
+ }
+ return ret;
}
int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data)