diff options
author | Igor Mammedov <imammedo@redhat.com> | 2018-05-04 10:37:42 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2018-05-30 13:16:51 -0300 |
commit | 71dc578e116599ea73c8a2a4e693134702ec0e83 (patch) | |
tree | 6f52623d5878c90fd6c91182bb43099c9080273a | |
parent | 8a36283e120ab3633557d6732fa700366e0137c7 (diff) |
hmp: disable monitor in preconfig state
Ban it for now, if someone would need it to work early,
one would have to implement checks if HMP command is valid
at preconfig state.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1525423069-61903-5-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rw-r--r-- | monitor.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -3371,6 +3371,12 @@ static void handle_hmp_command(Monitor *mon, const char *cmdline) trace_handle_hmp_command(mon, cmdline); + if (runstate_check(RUN_STATE_PRECONFIG)) { + monitor_printf(mon, "HMP not available in preconfig state, " + "use QMP instead\n"); + return; + } + cmd = monitor_parse_command(mon, cmdline, &cmdline, mon->cmd_table); if (!cmd) { return; |