]> git.proxmox.com Git - qemu.git/blobdiff - hmp.c
QAPI: Introduce memchar-write QMP command
[qemu.git] / hmp.c
diff --git a/hmp.c b/hmp.c
index ae16916da289cd7e521d0b5288c8acb41481eeef..cd614e8720f70cd99595b57e1883d0a5b6ac2d21 100644 (file)
--- a/hmp.c
+++ b/hmp.c
@@ -662,6 +662,19 @@ void hmp_pmemsave(Monitor *mon, const QDict *qdict)
     hmp_handle_error(mon, &errp);
 }
 
+void hmp_memchar_write(Monitor *mon, const QDict *qdict)
+{
+    uint32_t size;
+    const char *chardev = qdict_get_str(qdict, "device");
+    const char *data = qdict_get_str(qdict, "data");
+    Error *errp = NULL;
+
+    size = strlen(data);
+    qmp_memchar_write(chardev, size, data, false, 0, &errp);
+
+    hmp_handle_error(mon, &errp);
+}
+
 static void hmp_cont_cb(void *opaque, int err)
 {
     if (!err) {