提交 4debb5f5 编写于 作者: D Dr. David Alan Gilbert 提交者: Juan Quintela

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: NDr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NAmit Shah <amit.shah@redhat.com>
Signed-off-by: NJuan Quintela <quintela@redhat.com>
上级 d8760534
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册