aboutsummaryrefslogtreecommitdiff
path: root/monitor/hmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor/hmp.c')
-rw-r--r--monitor/hmp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/monitor/hmp.c b/monitor/hmp.c
index d40f4f4391..f2fe192d69 100644
--- a/monitor/hmp.c
+++ b/monitor/hmp.c
@@ -24,6 +24,7 @@
#include "qemu/osdep.h"
#include <dirent.h>
+#include "hw/qdev-core.h"
#include "monitor-internal.h"
#include "qapi/error.h"
#include "qapi/qmp/qdict.h"
@@ -215,7 +216,7 @@ static bool cmd_can_preconfig(const HMPCommand *cmd)
static bool cmd_available(const HMPCommand *cmd)
{
- return !runstate_check(RUN_STATE_PRECONFIG) || cmd_can_preconfig(cmd);
+ return qdev_hotplug || cmd_can_preconfig(cmd);
}
static void help_cmd_dump_one(Monitor *mon,
@@ -658,8 +659,8 @@ static const HMPCommand *monitor_parse_command(MonitorHMP *hmp_mon,
return NULL;
}
if (!cmd_available(cmd)) {
- monitor_printf(mon, "Command '%.*s' not available with -preconfig "
- "until after exit_preconfig.\n",
+ monitor_printf(mon, "Command '%.*s' not available "
+ "until machine initialization has completed.\n",
(int)(p - cmdp_start), cmdp_start);
return NULL;
}