From: Luiz Capitulino Date: Mon, 14 Dec 2009 20:53:23 +0000 (-0200) Subject: monitor: Avoid readline functions in QMP X-Git-Tag: v0.12.0~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=602e97b725302c5dbd6448abf08958e5a7cc5533;p=thirdparty%2Fqemu.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 Signed-off-by: Anthony Liguori (cherry picked from commit 183e6e525764d5c4978e37b42dc2cde0b0ffcfec) --- diff --git a/monitor.c b/monitor.c index 920ccff5841..b518cc4b555 100644 --- a/monitor.c +++ b/monitor.c @@ -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);