qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 21/21] monitor: Change return type of monitor_cur_is_qmp() to bool
Date: Tue,  2 Jun 2015 10:23:59 +0200	[thread overview]
Message-ID: <1433233439-3386-22-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1433233439-3386-1-git-send-email-armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 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 be18ac1..c7baa91 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

  parent reply	other threads:[~2015-06-02  8:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02  8:23 [Qemu-devel] [PULL 00/21] Monitor patches Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 01/21] monitor: Drop broken, unused asynchronous command interface Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 02/21] monitor: Clean up after previous commit Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 03/21] monitor: Improve and document client_migrate_info protocol error Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 04/21] monitor: Convert client_migrate_info to QAPI Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 05/21] monitor: Use traditional command interface for HMP drive_del Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 06/21] monitor: Use traditional command interface for HMP device_add Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 07/21] monitor: Use trad. command interface for HMP pcie_aer_inject_error Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 08/21] monitor: Drop unused "new" HMP command interface Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 09/21] monitor: Propagate errors through qmp_check_client_args() Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 10/21] monitor: Propagate errors through qmp_check_input_obj() Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 11/21] monitor: Propagate errors through invalid_qmp_mode() Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 12/21] monitor: Wean monitor_protocol_emitter() off mon->error Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 13/21] monitor: Inline monitor_has_error() into its only caller Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 14/21] monitor: Limit QError use to command handlers Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 15/21] monitor: Rename handle_user_command() to handle_hmp_command() Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 16/21] monitor: Rename monitor_control_read(), monitor_control_event() Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 17/21] monitor: Unbox Monitor member mc and rename to qmp Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 18/21] monitor: Drop do_qmp_capabilities()'s superfluous QMP check Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 19/21] monitor: Turn int command_mode into bool in_command_mode Markus Armbruster
2015-06-02  8:23 ` [Qemu-devel] [PULL 20/21] monitor: Rename monitor_ctrl_mode() to monitor_is_qmp() Markus Armbruster
2015-06-02  8:23 ` Markus Armbruster [this message]
2015-06-04  9:21 ` [Qemu-devel] [PULL 00/21] Monitor patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433233439-3386-22-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).