Patchwork [V5,07/28] qapi event: convert SHUTDOWN

login
register
mail settings
Submitter Wenchao Xia
Date May 1, 2014, 4:26 a.m.
Message ID <1398918422-3019-8-git-send-email-wenchaoqemu@gmail.com>
Download mbox | patch
Permalink /patch/344400/
State New
Headers show

Comments

Wenchao Xia - May 1, 2014, 4:26 a.m.
Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com>
---
 vl.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Eric Blake - May 1, 2014, 2:44 p.m.
On 04/30/2014 10:26 PM, Wenchao Xia wrote:
> Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com>
> ---
>  vl.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

This, and many of the subsequent patches in the series, are a bit
misleading; I have to go back to 5/28 to make sure that both pieces of
the conversion are in sync.  Is there a technical reason why you can't
provide both the qapi definition and the conversion to the new
qapi_event_send_FOO function in the same patch, one patch per FOO,
rather than your current split?
Wenchao Xia - May 7, 2014, 12:55 p.m.
于 2014/5/1 22:44, Eric Blake 写道:
> On 04/30/2014 10:26 PM, Wenchao Xia wrote:
>> Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com>
>> ---
>>   vl.c |    3 ++-
>>   1 files changed, 2 insertions(+), 1 deletions(-)
>
> This, and many of the subsequent patches in the series, are a bit
> misleading; I have to go back to 5/28 to make sure that both pieces of
> the conversion are in sync.  Is there a technical reason why you can't
> provide both the qapi definition and the conversion to the new
> qapi_event_send_FOO function in the same patch, one patch per FOO,
> rather than your current split?
>
   No, it is just easy to get conflict to modifiy one file in 20+
patches when rebase, so I modified it once in patch 5/28. I'll adjust
it in next version.

Patch

diff --git a/vl.c b/vl.c
index 236f95e..9f78bd7 100644
--- a/vl.c
+++ b/vl.c
@@ -117,6 +117,7 @@  int main(int argc, char **argv)
 #include "ui/qemu-spice.h"
 #include "qapi/string-input-visitor.h"
 #include "qom/object_interfaces.h"
+#include "qapi-event.h"
 
 #define DEFAULT_RAM_SIZE 128
 
@@ -2007,7 +2008,7 @@  static bool main_loop_should_exit(void)
     }
     if (qemu_shutdown_requested()) {
         qemu_kill_report();
-        monitor_protocol_event(QEVENT_SHUTDOWN, NULL);
+        qapi_event_send_shutdown(NULL);
         if (no_shutdown) {
             vm_stop(RUN_STATE_SHUTDOWN);
         } else {