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

login
register
mail settings
Submitter Luiz Capitulino
Date Oct. 16, 2009, 3:23 p.m.
Message ID <1255706631-3742-8-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/36243/
State New
Headers show

Comments

Luiz Capitulino - Oct. 16, 2009, 3:23 p.m.
Note that errors are not being converted yet.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 monitor.c       |    2 +-
 qemu-monitor.hx |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/monitor.c b/monitor.c
index a095971..a0d371d 100644
--- a/monitor.c
+++ b/monitor.c
@@ -570,7 +570,7 @@  static int eject_device(Monitor *mon, BlockDriverState *bs, int force)
     return 0;
 }
 
-static void do_eject(Monitor *mon, const QDict *qdict)
+static void do_eject(Monitor *mon, const QDict *qdict, QObject **ret_data)
 {
     BlockDriverState *bs;
     int force = qdict_get_int(qdict, "force");
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 4610ad4..05b4534 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -133,7 +133,8 @@  ETEXI
         .args_type  = "force:-f,filename:B",
         .params     = "[-f] device",
         .help       = "eject a removable medium (use -f to force it)",
-        .mhandler.cmd = do_eject,
+        .user_print = monitor_user_noop,
+        .mhandler.cmd_new = do_eject,
     },
 
 STEXI