]> git.proxmox.com Git - qemu.git/blobdiff - hmp.c
qapi: Convert eject
[qemu.git] / hmp.c
diff --git a/hmp.c b/hmp.c
index 081acabd21f2fc8baf777158c0d575eaf0261f68..a0752f585e4ed555cbe11861e1b18ee3349ccef1 100644 (file)
--- 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);
+}