On Mon, Feb 19, 2024 at 11:38 PM Markus Armbruster <arm...@redhat.com> wrote:
> Hyman Huang <yong.hu...@smartx.com> writes: > > > qmp_decode_protocols(), qmp_decode_status(), and qmp_decode_features() > > are now only used in virtio-hmp-cmds.c. So move them into there, > > redeclare them to static, and replace the qmp_ prefix with hmp_. > > > > Signed-off-by: Hyman Huang <yong.hu...@smartx.com> > > --- > > hw/virtio/meson.build | 3 +- > > hw/virtio/virtio-hmp-cmds.c | 677 +++++++++++++++++++++++++++++++++++- > > hw/virtio/virtio-qmp.c | 661 ----------------------------------- > > hw/virtio/virtio-qmp.h | 3 - > > 4 files changed, 670 insertions(+), 674 deletions(-) > > > > diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build > > index 47baf00366..6665669480 100644 > > --- a/hw/virtio/meson.build > > +++ b/hw/virtio/meson.build > > @@ -9,7 +9,7 @@ system_virtio_ss.add(when: 'CONFIG_VHOST_VDPA_DEV', > if_true: files('vdpa-dev.c') > > > > specific_virtio_ss = ss.source_set() > > specific_virtio_ss.add(files('virtio.c')) > > -specific_virtio_ss.add(files('virtio-config-io.c', 'virtio-qmp.c')) > > +specific_virtio_ss.add(files('virtio-config-io.c', 'virtio-qmp.c', > 'virtio-hmp-cmds.c')) > > I think you can also move virtio-qmp.c, i.e. > > specific_virtio_ss.add(files('virtio-config-io.c', 'virtio-hmp-cmds.c')) > > here, and ... > > > > > if have_vhost > > system_virtio_ss.add(files('vhost.c')) > > @@ -74,7 +74,6 @@ specific_virtio_ss.add_all(when: 'CONFIG_VIRTIO_PCI', > if_true: virtio_pci_ss) > > system_ss.add_all(when: 'CONFIG_VIRTIO', if_true: system_virtio_ss) > > system_ss.add(when: 'CONFIG_VIRTIO', if_false: files('vhost-stub.c')) > > system_ss.add(when: 'CONFIG_VIRTIO', if_false: files('virtio-stub.c')) > > -system_ss.add(files('virtio-hmp-cmds.c')) > > system_ss.add(files('virtio-qmp.c')) > > here. > Get it, I'll try in the next version. > [...] > > -- Best regards