aboutsummaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
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);
+}