monitor: Rename monitor_control_read(), monitor_control_event()
... to monitor_qmp_read(), monitor_qmp_event(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
7ef6cf6341
commit
c83fe23b58
14
monitor.c
14
monitor.c
@ -5042,10 +5042,7 @@ err_out:
|
|||||||
QDECREF(args);
|
QDECREF(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
static void monitor_qmp_read(void *opaque, const uint8_t *buf, int size)
|
||||||
* monitor_control_read(): Read and handle QMP input
|
|
||||||
*/
|
|
||||||
static void monitor_control_read(void *opaque, const uint8_t *buf, int size)
|
|
||||||
{
|
{
|
||||||
Monitor *old_mon = cur_mon;
|
Monitor *old_mon = cur_mon;
|
||||||
|
|
||||||
@ -5110,10 +5107,7 @@ static QObject *get_qmp_greeting(void)
|
|||||||
return qobject_from_jsonf("{'QMP':{'version': %p,'capabilities': []}}",ver);
|
return qobject_from_jsonf("{'QMP':{'version': %p,'capabilities': []}}",ver);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
static void monitor_qmp_event(void *opaque, int event)
|
||||||
* monitor_control_event(): Print QMP gretting
|
|
||||||
*/
|
|
||||||
static void monitor_control_event(void *opaque, int event)
|
|
||||||
{
|
{
|
||||||
QObject *data;
|
QObject *data;
|
||||||
Monitor *mon = opaque;
|
Monitor *mon = opaque;
|
||||||
@ -5263,8 +5257,8 @@ void monitor_init(CharDriverState *chr, int flags)
|
|||||||
if (monitor_ctrl_mode(mon)) {
|
if (monitor_ctrl_mode(mon)) {
|
||||||
mon->mc = g_malloc0(sizeof(MonitorControl));
|
mon->mc = g_malloc0(sizeof(MonitorControl));
|
||||||
/* Control mode requires special handlers */
|
/* Control mode requires special handlers */
|
||||||
qemu_chr_add_handlers(chr, monitor_can_read, monitor_control_read,
|
qemu_chr_add_handlers(chr, monitor_can_read, monitor_qmp_read,
|
||||||
monitor_control_event, mon);
|
monitor_qmp_event, mon);
|
||||||
qemu_chr_fe_set_echo(chr, true);
|
qemu_chr_fe_set_echo(chr, true);
|
||||||
|
|
||||||
json_message_parser_init(&mon->mc->parser, handle_qmp_command);
|
json_message_parser_init(&mon->mc->parser, handle_qmp_command);
|
||||||
|
Loading…
Reference in New Issue
Block a user