From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Xu <peterx@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: [Qemu-devel] [PULL 16/36] monitor: move skip_flush into monitor_data_init
Date: Mon, 12 Mar 2018 13:36:07 -0500 [thread overview]
Message-ID: <20180312183628.394722-17-eblake@redhat.com> (raw)
In-Reply-To: <20180312183628.394722-1-eblake@redhat.com>
From: Peter Xu <peterx@redhat.com>
It's part of the data init. Collect it.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180309090006.10018-6-peterx@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
---
monitor.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/monitor.c b/monitor.c
index c18a2f2dc98..b5acc92b735 100644
--- a/monitor.c
+++ b/monitor.c
@@ -570,13 +570,14 @@ static void monitor_qapi_event_init(void)
static void handle_hmp_command(Monitor *mon, const char *cmdline);
-static void monitor_data_init(Monitor *mon)
+static void monitor_data_init(Monitor *mon, bool skip_flush)
{
memset(mon, 0, sizeof(Monitor));
qemu_mutex_init(&mon->out_lock);
mon->outbuf = qstring_new();
/* Use *mon_cmds by default. */
mon->cmd_table = mon_cmds;
+ mon->skip_flush = skip_flush;
}
static void monitor_data_destroy(Monitor *mon)
@@ -597,8 +598,7 @@ char *qmp_human_monitor_command(const char *command_line, bool has_cpu_index,
char *output = NULL;
Monitor *old_mon, hmp;
- monitor_data_init(&hmp);
- hmp.skip_flush = true;
+ monitor_data_init(&hmp, true);
old_mon = cur_mon;
cur_mon = &hmp;
@@ -4039,7 +4039,7 @@ void monitor_init(Chardev *chr, int flags)
}
mon = g_malloc(sizeof(*mon));
- monitor_data_init(mon);
+ monitor_data_init(mon, false);
qemu_chr_fe_init(&mon->chr, chr, &error_abort);
mon->flags = flags;
--
2.14.3
next prev parent reply other threads:[~2018-03-12 18:36 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-12 18:35 [Qemu-devel] [PULL 00/36] QAPI patches for 2018-03-12, 2.12 softfreeze Eric Blake
2018-03-12 18:35 ` [Qemu-devel] [PULL 01/36] qapi2texi: minor python code simplification Eric Blake
2018-03-12 18:35 ` [Qemu-devel] [PULL 02/36] qlit: use QType instead of int Eric Blake
2018-03-12 18:35 ` [Qemu-devel] [PULL 03/36] qlit: add qobject_from_qlit() Eric Blake
2018-03-12 18:35 ` [Qemu-devel] [PULL 04/36] qapi: generate a literal qobject for introspection Eric Blake
2018-03-12 18:35 ` [Qemu-devel] [PULL 05/36] compiler: Add QEMU_BUILD_BUG_MSG() macro Eric Blake
2018-03-12 18:35 ` [Qemu-devel] [PULL 06/36] qapi: Add qobject_to() Eric Blake
2018-03-12 18:35 ` [Qemu-devel] [PULL 07/36] qapi: Replace qobject_to_X(o) by qobject_to(X, o) Eric Blake
2018-03-12 18:35 ` [Qemu-devel] [PULL 08/36] qapi: Remove qobject_to_X() functions Eric Blake
2018-04-12 17:51 ` [Qemu-devel] [PULL, " Yuval Shaia
2018-04-12 20:52 ` Eric Blake
2018-04-13 11:33 ` Yuval Shaia
2018-03-12 18:36 ` [Qemu-devel] [PULL 09/36] qapi: Make more of qobject_to() Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 10/36] block: Handle null backing link Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 11/36] block: Deprecate "backing": "" Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 12/36] docs: update QMP documents for OOB commands Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 13/36] qobject: introduce qstring_get_try_str() Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 14/36] qobject: introduce qobject_get_try_str() Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 15/36] qobject: let object_property_get_str() use new API Eric Blake
2018-03-12 18:36 ` Eric Blake [this message]
2018-03-12 18:36 ` [Qemu-devel] [PULL 17/36] monitor: move the cur_mon hack deeper for QMP Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 18/36] monitor: unify global init Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 19/36] monitor: let mon_list be tail queue Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 20/36] monitor: allow using IO thread for parsing Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 21/36] qmp: introduce QMPCapability Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 22/36] monitor: introduce monitor_qmp_respond() Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 23/36] monitor: let suspend_cnt be thread safe Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 24/36] monitor: let suspend/resume work even with QMPs Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 25/36] monitor: separate QMP parser and dispatcher Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 26/36] qmp: add new event "command-dropped" Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 27/36] monitor: send event when command queue full Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 28/36] qapi: introduce new cmd option "allow-oob" Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 29/36] qmp: support out-of-band (oob) execution Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 30/36] qmp: isolate responses into io thread Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 31/36] monitor: enable IO thread for (qmp & !mux) typed Eric Blake
2018-03-21 12:37 ` Max Reitz
2018-03-21 12:41 ` Max Reitz
2018-03-21 17:11 ` Eric Blake
2018-03-21 17:15 ` Dr. David Alan Gilbert
2018-03-22 3:09 ` Peter Xu
2018-03-12 18:36 ` [Qemu-devel] [PULL 32/36] qmp: add command "x-oob-test" Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 33/36] tests: qmp-test: verify command batching Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 34/36] tests: qmp-test: add oob test Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 35/36] block/accounting: introduce latency histogram Eric Blake
2018-03-12 18:36 ` [Qemu-devel] [PULL 36/36] qapi: add block latency histogram interface Eric Blake
2018-03-13 14:02 ` [Qemu-devel] [PULL 00/36] QAPI patches for 2018-03-12, 2.12 softfreeze Peter Maydell
2018-03-13 14:17 ` Eric Blake
2018-03-13 15:21 ` Peter Xu
2018-03-13 21:55 ` Eric Blake
2018-03-14 12:31 ` 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=20180312183628.394722-17-eblake@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=peterx@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).