diff mbox

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

Message ID 1253136760-3614-8-git-send-email-lcapitulino@redhat.com
State Superseded
Headers show

Commit Message

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

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"
     },