mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
monitor: Move qmp_query_qmp_schema to qmp-cmds-control.c
monitor/misc.c contains code that works only in the system emulator, so it can't be linked to tools like a storage daemon. In order to make schema introspection available for tools, move the function to monitor/qmp-cmds-control.c, which can be linked into the storage daemon. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200129102239.31435-5-kwolf@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
567628163e
commit
7d3f505359
3 changed files with 19 additions and 16 deletions
|
@ -75,7 +75,6 @@
|
|||
#include "qapi/qapi-init-commands.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qmp-event.h"
|
||||
#include "qapi/qapi-introspect.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "tcg/tcg.h"
|
||||
|
@ -232,21 +231,6 @@ static void hmp_info_help(Monitor *mon, const QDict *qdict)
|
|||
help_cmd(mon, "info");
|
||||
}
|
||||
|
||||
/*
|
||||
* Minor hack: generated marshalling suppressed for this command
|
||||
* ('gen': false in the schema) so we can parse the JSON string
|
||||
* directly into QObject instead of first parsing it with
|
||||
* visit_type_SchemaInfoList() into a SchemaInfoList, then marshal it
|
||||
* to QObject with generated output marshallers, every time. Instead,
|
||||
* we do it in test-qobject-input-visitor.c, just to make sure
|
||||
* qapi-gen.py's output actually conforms to the schema.
|
||||
*/
|
||||
static void qmp_query_qmp_schema(QDict *qdict, QObject **ret_data,
|
||||
Error **errp)
|
||||
{
|
||||
*ret_data = qobject_from_qlit(&qmp_schema_qlit);
|
||||
}
|
||||
|
||||
static void monitor_init_qmp_commands(void)
|
||||
{
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue