Re: [PATCH v4 42/49] hw: guard BusClass::print_dev with CONFIG_HMP

Daniel P. Berrangé <[email protected]>
Newsgroups gmane.comp.emulators.xen.devel,gmane.comp.emulators.qemu
Message-ID <[email protected]>
On Tue, Aug 25, 2026 at 11:09:49PM +0400, Marc-André Lureau wrote:
> The print_dev callback is only used by HMP 'info qtree'. Guard the field
> in BusClass, all implementations, and the caller with CONFIG_HMP.
> 
> Signed-off-by: Marc-André Lureau <[email protected]>
> ---
>  hw/char/virtio-serial-bus.c |  6 ++++++
>  hw/core/sysbus.c            |  6 ++++++
>  hw/misc/auxbus.c            | 16 +++++++++++-----
>  hw/pci/pci-hmp-cmds.c       |  2 ++
>  hw/pci/pci.c                |  2 ++
>  hw/usb/bus.c                |  6 ++++++
>  hw/xen/xen-bus.c            |  4 ++++
>  include/hw/core/qdev.h      |  2 ++
>  8 files changed, 39 insertions(+), 5 deletions(-)

Reviewed-by: Daniel P. Berrangé <[email protected]>

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.