]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commitdiff
qapi event: clean up in callers
authorWenchao Xia <wenchaoqemu@gmail.com>
Tue, 24 Jun 2014 23:34:00 +0000 (16:34 -0700)
committerLuiz Capitulino <lcapitulino@redhat.com>
Fri, 27 Jun 2014 13:27:56 +0000 (09:27 -0400)
This patch improves docs and address small issues in event
callers.

Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
hw/watchdog/watchdog.c
include/block/blockjob.h
monitor.c
qapi-schema.json
qapi/block-core.json
qapi/event.json

index 4aebd3492475a0d4548c17127d8dadebbec61d48..9f607d42bbea5cbf324ed43181be0644b5b0a031 100644 (file)
@@ -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();
index e443987ea88b5c9c8af71c6a9eb2e1a67f7dd8aa..cc765b50e6d6e294a316d324bdba35123baba0f0 100644 (file)
@@ -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.
index a8ab600c887d645f9847e4461166a70867f0ee04..fd34ab705a5ed81462ab0d193829b4611c1d80db 100644 (file)
--- 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);
 
index 37c218994e238c498c0de8dd1af6629ad7851393..c68a17f4d8c8634ae18e2624245ec25850d90836 100644 (file)
 #
 # @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
 #
 ##
 { 'type': 'VncClientInfo',
   'base': 'VncBasicInfo',
-  'data': { '*x509_dname'   : 'str', '*sasl_username': 'str' } }
+  'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
 
 ##
 # @VncInfo:
index af6b43654059dcd4ca335e3c459dd8764f2d5468..925e53e944af8bd70c59a0521a4a7820c4db4650 100644 (file)
 # @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
index e7a47f99278af470a08d7f3b6decd407af4e6c99..8f817b18a13d32457de8d17ca7eec45606cc3c3f 100644 (file)
@@ -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