diff options
author | Lei Li <lilei@linux.vnet.ibm.com> | 2013-01-25 00:03:20 +0800 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2013-01-25 11:23:06 -0200 |
commit | 1f590cf9455c571799d1bfc0777255fa0796d4da (patch) | |
tree | 587b89852266e89772c565474d85d95f34fba37d /hmp.c | |
parent | 51767e7cf2c3abc07d30009ab3d6262bdfd89b8b (diff) | |
download | qemu-1f590cf9455c571799d1bfc0777255fa0796d4da.tar.gz qemu-1f590cf9455c571799d1bfc0777255fa0796d4da.tar.bz2 qemu-1f590cf9455c571799d1bfc0777255fa0796d4da.zip |
QAPI: Introduce memchar-write QMP command
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'hmp.c')
-rw-r--r-- | hmp.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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) { |