mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
monitor: remove 'query-events' QMP command
The code comment suggests removing QAPIEvent_(str|lookup) symbols too, however, these are both auto-generated as standard for any enum in QAPI. As such it they'll exist whether we use them or not. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
283d845c91
commit
8becb36063
4 changed files with 6 additions and 75 deletions
|
@ -130,30 +130,6 @@ CommandInfoList *qmp_query_commands(Error **errp)
|
|||
return list;
|
||||
}
|
||||
|
||||
EventInfoList *qmp_query_events(Error **errp)
|
||||
{
|
||||
/*
|
||||
* TODO This deprecated command is the only user of
|
||||
* QAPIEvent_str() and QAPIEvent_lookup[]. When the command goes,
|
||||
* they should go, too.
|
||||
*/
|
||||
EventInfoList *ev_list = NULL;
|
||||
QAPIEvent e;
|
||||
|
||||
for (e = 0 ; e < QAPI_EVENT__MAX ; e++) {
|
||||
const char *event_name = QAPIEvent_str(e);
|
||||
EventInfo *info;
|
||||
|
||||
assert(event_name != NULL);
|
||||
info = g_malloc0(sizeof(*info));
|
||||
info->name = g_strdup(event_name);
|
||||
|
||||
QAPI_LIST_PREPEND(ev_list, info);
|
||||
}
|
||||
|
||||
return ev_list;
|
||||
}
|
||||
|
||||
/*
|
||||
* Minor hack: generated marshalling suppressed for this command
|
||||
* ('gen': false in the schema) so we can parse the JSON string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue