Patchwork [7/7] monitor: Convert do_system_powerdown() to QObject

login
register
mail settings
Submitter Luiz Capitulino
Date Sept. 16, 2009, 9:32 p.m.
Message ID <1253136760-3614-8-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/33749/
State Superseded
Headers show

Comments

Luiz Capitulino - Sept. 16, 2009, 9:32 p.m.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 monitor.c       |    9 ++++++++-
 qemu-monitor.hx |    2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

Patch

diff --git a/monitor.c b/monitor.c
index ef2d8c1..db73642 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1311,9 +1311,16 @@  static int do_system_reset(Monitor *mon, const QDict *qdict, QObject **ret_data)
     return 0;
 }
 
-static void do_system_powerdown(Monitor *mon, const QDict *qdict)
+/**
+ * do_system_powerdown(): Issue a machine powerdown
+ *
+ * return always succeed.
+ */
+static int do_system_powerdown(Monitor *mon, const QDict *qdict,
+                               QObject **ret_data)
 {
     qemu_system_powerdown_request();
+    return 0;
 }
 
 #if defined(TARGET_I386)
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 5b3f84f..1159686 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -478,7 +478,7 @@  ETEXI
         .name       = "system_powerdown",
         .args_type  = "",
         .handler    = do_system_powerdown,
-        .user_print = NULL,
+        .user_print = monitor_print_nothing,
         .params     = "",
         .help       = "send system power down event"
     },