diff options
| author | Luiz Capitulino <lcapitulino@redhat.com> | 2009-12-14 18:53:23 -0200 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-12-18 11:26:27 -0600 |
| commit | 183e6e525764d5c4978e37b42dc2cde0b0ffcfec (patch) | |
| tree | e236f0eb4dc22f1b326bdd3204c4ab6e3dc44b06 | |
| parent | cfdf2c40577ed99bb19cdc05d0537e2808d77a78 (diff) | |
| download | focaccia-qemu-183e6e525764d5c4978e37b42dc2cde0b0ffcfec.tar.gz focaccia-qemu-183e6e525764d5c4978e37b42dc2cde0b0ffcfec.zip | |
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>
| -rw-r--r-- | monitor.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c index 920ccff584..b518cc4b55 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); |