monitor: Change return type of monitor_cur_is_qmp() to bool

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
Markus Armbruster 2015-03-06 20:01:05 +01:00
parent 9f3982f2dc
commit 489653b5db
3 changed files with 7 additions and 5 deletions

View file

@ -16,7 +16,7 @@ extern Monitor *default_mon;
#define MONITOR_USE_CONTROL 0x04 #define MONITOR_USE_CONTROL 0x04
#define MONITOR_USE_PRETTY 0x08 #define MONITOR_USE_PRETTY 0x08
int monitor_cur_is_qmp(void); bool monitor_cur_is_qmp(void);
void monitor_init(CharDriverState *chr, int flags); void monitor_init(CharDriverState *chr, int flags);

View file

@ -239,8 +239,10 @@ static inline bool monitor_is_qmp(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) * Is the current monitor, if any, a QMP monitor?
*/
bool monitor_cur_is_qmp(void)
{ {
return cur_mon && monitor_is_qmp(cur_mon); return cur_mon && monitor_is_qmp(cur_mon);
} }

View file

@ -1,7 +1,7 @@
#include "qemu-common.h" #include "qemu-common.h"
#include "monitor/monitor.h" #include "monitor/monitor.h"
int monitor_cur_is_qmp(void) bool monitor_cur_is_qmp(void)
{ {
return 0; return false;
} }