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

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

Comments

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

Patch

diff --git a/monitor.c b/monitor.c
index 9ef9108..ef2d8c1 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1300,9 +1300,15 @@  static void do_boot_set(Monitor *mon, const QDict *qdict)
     }
 }
 
-static void do_system_reset(Monitor *mon, const QDict *qdict)
+/**
+ * do_system_reset(): Issue a machine reset
+ *
+ * return always succeed.
+ */
+static int do_system_reset(Monitor *mon, const QDict *qdict, QObject **ret_data)
 {
     qemu_system_reset_request();
+    return 0;
 }
 
 static void do_system_powerdown(Monitor *mon, const QDict *qdict)
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index f6c9911..5b3f84f 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -464,7 +464,7 @@  ETEXI
         .name       = "system_reset",
         .args_type  = "",
         .handler    = do_system_reset,
-        .user_print = NULL,
+        .user_print = monitor_print_nothing,
         .params     = "",
         .help       = "reset the system"
     },