From 1f590cf9455c571799d1bfc0777255fa0796d4da Mon Sep 17 00:00:00 2001 From: Lei Li Date: Fri, 25 Jan 2013 00:03:20 +0800 Subject: QAPI: Introduce memchar-write QMP command Signed-off-by: Lei Li Signed-off-by: Luiz Capitulino --- hmp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'hmp.c') diff --git a/hmp.c b/hmp.c index ae16916..cd614e8 100644 --- 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) { -- cgit v1.1