summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2015-02-26 14:54:41 +0000
committerJuan Quintela <quintela@redhat.com>2015-03-17 15:20:37 +0100
commit4debb5f553d816bf1f2d86bb61e833e79010cb3d (patch)
tree1d694da48cd7bb1b90e8533c502428ac19e02d9d
parentd87605347879b67f156af085d772ab88cde40820 (diff)
downloadqemu-4debb5f553d816bf1f2d86bb61e833e79010cb3d.tar.gz
migrate_incoming: Cleanup/clarify error messages
Create a separate error for the case where migrate_incoming is used after a succesful migrate_incoming. Reword the error in the case where '-incoming defer' is missing to omit the command name so it's right for both hmp and qmp. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
-rw-r--r--migration/migration.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 60da9fef3c..1e44d9bb83 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -434,11 +434,15 @@ void migrate_del_blocker(Error *reason)
void qmp_migrate_incoming(const char *uri, Error **errp)
{
Error *local_err = NULL;
+ static bool once = true;
if (!deferred_incoming) {
- error_setg(errp, "'-incoming defer' is required for migrate_incoming");
+ error_setg(errp, "For use with '-incoming defer'");
return;
}
+ if (!once) {
+ error_setg(errp, "The incoming migration has already been started");
+ }
qemu_start_incoming_migration(uri, &local_err);
@@ -447,7 +451,7 @@ void qmp_migrate_incoming(const char *uri, Error **errp)
return;
}
- deferred_incoming = false;
+ once = false;
}
void qmp_migrate(const char *uri, bool has_blk, bool blk,