mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
QAPI: Introduce memchar-write QMP command
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
51767e7cf2
commit
1f590cf945
6 changed files with 145 additions and 0 deletions
13
hmp.c
13
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue