mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
monitor: Avoid readline functions in QMP
The monitor_read_command() function is readline specific and should only be used when readline is available. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
cfdf2c4057
commit
183e6e5257
1 changed files with 3 additions and 0 deletions
|
@ -140,6 +140,9 @@ static inline int monitor_ctrl_mode(const Monitor *mon)
|
|||
|
||||
static void monitor_read_command(Monitor *mon, int show_prompt)
|
||||
{
|
||||
if (!mon->rs)
|
||||
return;
|
||||
|
||||
readline_start(mon->rs, "(qemu) ", 0, monitor_command_cb, NULL);
|
||||
if (show_prompt)
|
||||
readline_show_prompt(mon->rs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue