mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
dump-guest-memory: add dump_in_progress() helper function
For now, it has no effect. It will be used in dump detach support. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-Id: <1455772616-8668-5-git-send-email-peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
baf28f57e2
commit
65d64f3623
3 changed files with 31 additions and 0 deletions
14
qmp.c
14
qmp.c
|
|
@ -103,6 +103,13 @@ void qmp_quit(Error **errp)
|
|||
|
||||
void qmp_stop(Error **errp)
|
||||
{
|
||||
/* if there is a dump in background, we should wait until the dump
|
||||
* finished */
|
||||
if (dump_in_progress()) {
|
||||
error_setg(errp, "There is a dump in process, please wait.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (runstate_check(RUN_STATE_INMIGRATE)) {
|
||||
autostart = 0;
|
||||
} else {
|
||||
|
|
@ -175,6 +182,13 @@ void qmp_cont(Error **errp)
|
|||
BlockBackend *blk;
|
||||
BlockDriverState *bs;
|
||||
|
||||
/* if there is a dump in background, we should wait until the dump
|
||||
* finished */
|
||||
if (dump_in_progress()) {
|
||||
error_setg(errp, "There is a dump in process, please wait.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (runstate_needs_reset()) {
|
||||
error_setg(errp, "Resetting the Virtual Machine is required");
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue