From: Markus Armbruster Date: Thu, 11 Feb 2010 16:05:43 +0000 (+0100) Subject: monitor: New monitor_cur_is_qmp() X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1405^2~17^2~4795^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6620d3ce9ee44c01c7d715322be7879ad3d98c7a;p=sdk%2Femulator%2Fqemu.git monitor: New monitor_cur_is_qmp() --- diff --git a/monitor.c b/monitor.c index 4b6184b765..d8a31242b6 100644 --- a/monitor.c +++ b/monitor.c @@ -194,6 +194,12 @@ static inline int monitor_ctrl_mode(const Monitor *mon) 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) { if (!mon->rs) diff --git a/monitor.h b/monitor.h index dbb7becba9..bd4ae34d48 100644 --- a/monitor.h +++ b/monitor.h @@ -31,6 +31,8 @@ typedef enum MonitorEvent { QEVENT_MAX, } MonitorEvent; +int monitor_cur_is_qmp(void); + void monitor_protocol_event(MonitorEvent event, QObject *data); void monitor_init(CharDriverState *chr, int flags);