mirror of https://github.com/xemu-project/xemu.git
monitor: New monitor_cur_is_qmp()
This commit is contained in:
parent
036f7166c7
commit
6620d3ce9e
|
@ -194,6 +194,12 @@ static inline int monitor_ctrl_mode(const Monitor *mon)
|
||||||
return (mon->flags & MONITOR_USE_CONTROL);
|
return (mon->flags & MONITOR_USE_CONTROL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return non-zero iff we have a current monitor, and it is in QMP mode. */
|
||||||
|
int monitor_cur_is_qmp(void)
|
||||||
|
{
|
||||||
|
return cur_mon && monitor_ctrl_mode(cur_mon);
|
||||||
|
}
|
||||||
|
|
||||||
static void monitor_read_command(Monitor *mon, int show_prompt)
|
static void monitor_read_command(Monitor *mon, int show_prompt)
|
||||||
{
|
{
|
||||||
if (!mon->rs)
|
if (!mon->rs)
|
||||||
|
|
|
@ -31,6 +31,8 @@ typedef enum MonitorEvent {
|
||||||
QEVENT_MAX,
|
QEVENT_MAX,
|
||||||
} MonitorEvent;
|
} MonitorEvent;
|
||||||
|
|
||||||
|
int monitor_cur_is_qmp(void);
|
||||||
|
|
||||||
void monitor_protocol_event(MonitorEvent event, QObject *data);
|
void monitor_protocol_event(MonitorEvent event, QObject *data);
|
||||||
void monitor_init(CharDriverState *chr, int flags);
|
void monitor_init(CharDriverState *chr, int flags);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue