qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wenchao Xia <wenchaoqemu@gmail.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, armbru@redhat.com,
	Wenchao Xia <wenchaoqemu@gmail.com>,
	lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH FOR 2.1 5/5] qapi event: clean up in callers
Date: Tue, 24 Jun 2014 16:34:00 -0700	[thread overview]
Message-ID: <1403652840-13449-6-git-send-email-wenchaoqemu@gmail.com> (raw)
In-Reply-To: <1403652840-13449-1-git-send-email-wenchaoqemu@gmail.com>

This patch improves docs and address small issues in event
callers.

Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com>
---
 hw/watchdog/watchdog.c   |    2 +-
 include/block/blockjob.h |    2 +-
 monitor.c                |    2 +-
 qapi-schema.json         |    7 ++++---
 qapi/block-core.json     |    3 ++-
 qapi/event.json          |    4 ++--
 6 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/hw/watchdog/watchdog.c b/hw/watchdog/watchdog.c
index 4aebd34..9f607d4 100644
--- a/hw/watchdog/watchdog.c
+++ b/hw/watchdog/watchdog.c
@@ -106,7 +106,7 @@ int select_watchdog_action(const char *p)
  */
 void watchdog_perform_action(void)
 {
-    switch(watchdog_action) {
+    switch (watchdog_action) {
     case WDT_RESET:             /* same as 'system_reset' in monitor */
         qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_RESET, &error_abort);
         qemu_system_reset_request();
diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index e443987..cc765b5 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -217,7 +217,7 @@ void block_job_pause(BlockJob *job);
 void block_job_resume(BlockJob *job);
 
 /**
- * block_job_event_cancle:
+ * block_job_event_cancelled:
  * @job: The job whose information is requested.
  *
  * Send a BLOCK_JOB_CANCELLED event for the specified job.
diff --git a/monitor.c b/monitor.c
index a8ab600..fd34ab7 100644
--- a/monitor.c
+++ b/monitor.c
@@ -570,6 +570,7 @@ monitor_qapi_event_throttle(QAPIEvent event, int64_t rate)
 
     trace_monitor_protocol_event_throttle(event, rate);
     evstate->event = event;
+    assert(rate * SCALE_MS <= INT64_MAX);
     evstate->rate = rate * SCALE_MS;
     evstate->last = 0;
     evstate->data = NULL;
@@ -585,7 +586,6 @@ static void monitor_qapi_event_init(void)
     monitor_qapi_event_throttle(QAPI_EVENT_RTC_CHANGE, 1000);
     monitor_qapi_event_throttle(QAPI_EVENT_WATCHDOG, 1000);
     monitor_qapi_event_throttle(QAPI_EVENT_BALLOON_CHANGE, 1000);
-    /* limit the rate of quorum events to avoid hammering the management */
     monitor_qapi_event_throttle(QAPI_EVENT_QUORUM_REPORT_BAD, 1000);
     monitor_qapi_event_throttle(QAPI_EVENT_QUORUM_FAILURE, 1000);
 
diff --git a/qapi-schema.json b/qapi-schema.json
index 37c2189..c68a17f 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -657,8 +657,9 @@
 #
 # @host: IP address
 #
-# @service: The service name of vnc port. This may depend on the host system's
-#           service database so symbolic names should not be relied on.
+# @service: The service name of the vnc port. This may depend on the host
+#           system's service database so symbolic names should not be relied
+#           on.
 #
 # @family: address family
 #
@@ -697,7 +698,7 @@
 ##
 { 'type': 'VncClientInfo',
   'base': 'VncBasicInfo',
-  'data': { '*x509_dname'   : 'str', '*sasl_username': 'str' } }
+  'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
 
 ##
 # @VncInfo:
diff --git a/qapi/block-core.json b/qapi/block-core.json
index af6b436..925e53e 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1436,7 +1436,8 @@
 # @device: device name
 #
 # @msg: informative message for human consumption, such as the kind of
-#       corruption being detected
+#       corruption being detected. It should not be parsed by machine as it is
+#       not guaranteed to be stable
 #
 # @offset: #optional, if the corruption resulted from an image access, this is
 #          the access offset into the image
diff --git a/qapi/event.json b/qapi/event.json
index e7a47f9..8f817b1 100644
--- a/qapi/event.json
+++ b/qapi/event.json
@@ -1,8 +1,8 @@
 ##
 # @SHUTDOWN
 #
-# Emitted when the virtual machine has shutdown, possibly indicating that QEMU
-# is about about to exit.
+# Emitted when the virtual machine has shut down, indicating that qemu is
+# about to exit.
 #
 # Note: If the command-line option "-no-shutdown" has been specified, qemu will
 # not exit, and a STOP event will eventually follow the SHUTDOWN event
-- 
1.7.1

  parent reply	other threads:[~2014-06-24 23:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24 23:33 [Qemu-devel] [PATCH FOR 2.1 0/5] clean up for qapi event Wenchao Xia
2014-06-24 23:33 ` [Qemu-devel] [PATCH FOR 2.1 1/5] tests/test-qmp-event: fix for GLib < 2.31 Wenchao Xia
2014-06-25 13:13   ` Luiz Capitulino
2014-06-25 13:15     ` Paolo Bonzini
2014-06-27 18:28       ` Luiz Capitulino
2014-06-29 20:31         ` Peter Maydell
2014-06-30 10:53           ` Paolo Bonzini
2014-07-01 14:32             ` Wenchao Xia
2014-06-24 23:33 ` [Qemu-devel] [PATCH FOR 2.1 2/5] qapi: move event defines Wenchao Xia
2014-06-25  2:15   ` Eric Blake
2014-06-24 23:33 ` [Qemu-devel] [PATCH FOR 2.1 3/5] qapi: ignore generated event files Wenchao Xia
2014-06-25  2:20   ` Eric Blake
2014-06-24 23:33 ` [Qemu-devel] [PATCH FOR 2.1 4/5] qapi script: clean up in scripts Wenchao Xia
2014-06-25  2:39   ` Eric Blake
2014-06-24 23:34 ` Wenchao Xia [this message]
2014-06-25  2:48   ` [Qemu-devel] [PATCH FOR 2.1 5/5] qapi event: clean up in callers Eric Blake
2014-06-25 15:36 ` [Qemu-devel] [PATCH FOR 2.1 0/5] clean up for qapi event Luiz Capitulino

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=1403652840-13449-6-git-send-email-wenchaoqemu@gmail.com \
    --to=wenchaoqemu@gmail.com \
    --cc=armbru@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=pbonzini@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).