[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 20/20] monitor: Change return type of monitor_cur
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH v2 20/20] monitor: Change return type of monitor_cur_is_qmp() to bool |
Date: |
Tue, 26 May 2015 17:20:55 +0200 |
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
include/monitor/monitor.h | 2 +-
monitor.c | 6 ++++--
stubs/mon-is-qmp.c | 4 ++--
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h
index d409b6a..57f8394 100644
--- a/include/monitor/monitor.h
+++ b/include/monitor/monitor.h
@@ -16,7 +16,7 @@ extern Monitor *default_mon;
#define MONITOR_USE_CONTROL 0x04
#define MONITOR_USE_PRETTY 0x08
-int monitor_cur_is_qmp(void);
+bool monitor_cur_is_qmp(void);
void monitor_init(CharDriverState *chr, int flags);
diff --git a/monitor.c b/monitor.c
index 909f378..94a6026 100644
--- a/monitor.c
+++ b/monitor.c
@@ -239,8 +239,10 @@ static inline bool monitor_is_qmp(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)
+/**
+ * Is the current monitor, if any, a QMP monitor?
+ */
+bool monitor_cur_is_qmp(void)
{
return cur_mon && monitor_is_qmp(cur_mon);
}
diff --git a/stubs/mon-is-qmp.c b/stubs/mon-is-qmp.c
index 1f0a8fd..1ef136a 100644
--- a/stubs/mon-is-qmp.c
+++ b/stubs/mon-is-qmp.c
@@ -1,7 +1,7 @@
#include "qemu-common.h"
#include "monitor/monitor.h"
-int monitor_cur_is_qmp(void)
+bool monitor_cur_is_qmp(void)
{
- return 0;
+ return false;
}
--
1.9.3
- [Qemu-devel] [PATCH v2 13/20] monitor: Limit QError use to command handlers, (continued)
- [Qemu-devel] [PATCH v2 13/20] monitor: Limit QError use to command handlers, Markus Armbruster, 2015/05/26
- [Qemu-devel] [PATCH v2 06/20] monitor: Use traditional command interface for HMP device_add, Markus Armbruster, 2015/05/26
- [Qemu-devel] [PATCH v2 09/20] monitor: Propagate errors through qmp_check_client_args(), Markus Armbruster, 2015/05/26
- [Qemu-devel] [PATCH v2 11/20] monitor: Wean monitor_protocol_emitter() off mon->error, Markus Armbruster, 2015/05/26
- [Qemu-devel] [PATCH v2 17/20] monitor: Drop do_qmp_capabilities()'s superfluous QMP check, Markus Armbruster, 2015/05/26
- [Qemu-devel] [PATCH v2 19/20] monitor: Rename monitor_ctrl_mode() to monitor_is_qmp(), Markus Armbruster, 2015/05/26
- [Qemu-devel] [PATCH v2 07/20] monitor: Use trad. command interface for HMP pcie_aer_inject_error, Markus Armbruster, 2015/05/26
- [Qemu-devel] [PATCH v2 20/20] monitor: Change return type of monitor_cur_is_qmp() to bool,
Markus Armbruster <=
- [Qemu-devel] [PATCH v2 15/20] monitor: Rename monitor_control_read(), monitor_control_event(), Markus Armbruster, 2015/05/26
- [Qemu-devel] [PATCH v2 16/20] monitor: Unbox Monitor member mc and rename to qmp, Markus Armbruster, 2015/05/26
- [Qemu-devel] [PATCH v2 18/20] monitor: Turn int command_mode into bool in_command_mode, Markus Armbruster, 2015/05/26
- Re: [Qemu-devel] [PATCH v2 00/20] monitor: Wean core off QError, and other cleanups, Luiz Capitulino, 2015/05/28