mirror of https://github.com/xemu-project/xemu.git
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
|
@ -140,6 +140,9 @@ static inline int monitor_ctrl_mode(const Monitor *mon)
|
||||||
|
|
||||||
static void monitor_read_command(Monitor *mon, int show_prompt)
|
static void monitor_read_command(Monitor *mon, int show_prompt)
|
||||||
{
|
{
|
||||||
|
if (!mon->rs)
|
||||||
|
return;
|
||||||
|
|
||||||
readline_start(mon->rs, "(qemu) ", 0, monitor_command_cb, NULL);
|
readline_start(mon->rs, "(qemu) ", 0, monitor_command_cb, NULL);
|
||||||
if (show_prompt)
|
if (show_prompt)
|
||||||
readline_show_prompt(mon->rs);
|
readline_show_prompt(mon->rs);
|
||||||
|
|
Loading…
Reference in New Issue