mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
qapi: make query-cpu-definitions depend on specific targets
It depends on TARGET_PPC || TARGET_ARM || TARGET_I386 || TARGET_S390X. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190214152251.2073-15-armbru@redhat.com>
This commit is contained in:
parent
96f75b59b6
commit
25a9d6ca63
11 changed files with 70 additions and 102 deletions
22
monitor.c
22
monitor.c
|
@ -1131,26 +1131,6 @@ static void qmp_query_qmp_schema(QDict *qdict, QObject **ret_data,
|
|||
*ret_data = qobject_from_qlit(&qmp_schema_qlit);
|
||||
}
|
||||
|
||||
/*
|
||||
* We used to define commands in qmp-commands.hx in addition to the
|
||||
* QAPI schema. This permitted defining some of them only in certain
|
||||
* configurations. query-commands has always reflected that (good,
|
||||
* because it lets QMP clients figure out what's actually available),
|
||||
* while query-qmp-schema never did (not so good). This function is a
|
||||
* hack to keep the configuration-specific commands defined exactly as
|
||||
* before, even though qmp-commands.hx is gone.
|
||||
*
|
||||
* FIXME Educate the QAPI schema on configuration-specific commands,
|
||||
* and drop this hack.
|
||||
*/
|
||||
static void qmp_unregister_commands_hack(void)
|
||||
{
|
||||
#if !defined(TARGET_PPC) && !defined(TARGET_ARM) && !defined(TARGET_I386) \
|
||||
&& !defined(TARGET_S390X)
|
||||
qmp_unregister_command(&qmp_commands, "query-cpu-definitions");
|
||||
#endif
|
||||
}
|
||||
|
||||
static void monitor_init_qmp_commands(void)
|
||||
{
|
||||
/*
|
||||
|
@ -1169,8 +1149,6 @@ static void monitor_init_qmp_commands(void)
|
|||
qmp_register_command(&qmp_commands, "netdev_add", qmp_netdev_add,
|
||||
QCO_NO_OPTIONS);
|
||||
|
||||
qmp_unregister_commands_hack();
|
||||
|
||||
QTAILQ_INIT(&qmp_cap_negotiation_commands);
|
||||
qmp_register_command(&qmp_cap_negotiation_commands, "qmp_capabilities",
|
||||
qmp_marshal_qmp_capabilities, QCO_ALLOW_PRECONFIG);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue