mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
remove preconfig state
The preconfig state is only used if -incoming is not specified, which makes the RunState state machine more tricky than it need be. However there is already an equivalent condition which works even with -incoming, namely qdev_hotplug. Use it instead of a separate runstate. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
69e92bd558
commit
164dafd174
11 changed files with 34 additions and 29 deletions
|
@ -104,9 +104,8 @@ void qmp_system_powerdown(Error **errp)
|
|||
|
||||
void qmp_x_exit_preconfig(Error **errp)
|
||||
{
|
||||
if (!runstate_check(RUN_STATE_PRECONFIG)) {
|
||||
error_setg(errp, "The command is permitted only in '%s' state",
|
||||
RunState_str(RUN_STATE_PRECONFIG));
|
||||
if (qdev_hotplug) {
|
||||
error_setg(errp, "The command is permitted only before machine initialization");
|
||||
return;
|
||||
}
|
||||
qemu_exit_preconfig_request();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue