summaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2011-12-07 16:02:36 -0200
committerLuiz Capitulino <lcapitulino@redhat.com>2012-01-18 10:23:39 -0200
commitc245b6a37d76670c3ba7b9063bac943bb998bb7c (patch)
tree95cf2e606d25f167bb3b956018d60787700f7c95 /hmp.c
parent92d48558edb14666a2851068db4c2095664e0fbc (diff)
downloadqemu-c245b6a37d76670c3ba7b9063bac943bb998bb7c.tar.gz
qemu-c245b6a37d76670c3ba7b9063bac943bb998bb7c.tar.bz2
qemu-c245b6a37d76670c3ba7b9063bac943bb998bb7c.zip
qapi: Convert eject
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hmp.c b/hmp.c
index 081acabd21..a0752f585e 100644
--- a/hmp.c
+++ b/hmp.c
@@ -702,3 +702,13 @@ void hmp_expire_password(Monitor *mon, const QDict *qdict)
qmp_expire_password(protocol, whenstr, &err);
hmp_handle_error(mon, &err);
}
+
+void hmp_eject(Monitor *mon, const QDict *qdict)
+{
+ int force = qdict_get_try_bool(qdict, "force", 0);
+ const char *device = qdict_get_str(qdict, "device");
+ Error *err = NULL;
+
+ qmp_eject(device, true, force, &err);
+ hmp_handle_error(mon, &err);
+}