On 10/28/21 17:54, Daniel P. Berrangé wrote: > This is a counterpart to the HMP "info usb" command. It is being > added with an "x-" prefix because this QMP command is intended as an > adhoc debugging tool and will thus not be modelled in QAPI as fully > structured data, nor will it have long term guaranteed stability. > The existing HMP command is rewritten to call the QMP command. > > Signed-off-by: Daniel P. Berrangé <berra...@redhat.com> > --- > hmp-commands-info.hx | 2 +- > hw/usb/bus.c | 24 +++++++++++++++--------- > qapi/machine.json | 12 ++++++++++++ > stubs/usb-dev-stub.c | 8 ++++++++ > tests/qtest/qmp-cmd-test.c | 2 ++ > 5 files changed, 38 insertions(+), 10 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com> > --- a/tests/qtest/qmp-cmd-test.c > +++ b/tests/qtest/qmp-cmd-test.c > @@ -49,6 +49,8 @@ static int query_error_class(const char *cmd) > #ifndef CONFIG_PROFILER > { "x-query-profile", ERROR_CLASS_GENERIC_ERROR }, > #endif > + /* Only valid with a USB bus added */ > + { "x-query-usb", ERROR_CLASS_GENERIC_ERROR }, > { NULL, -1 } > }; > int i; >