]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
pci: Build hw/pci/pci-hmp-cmds.c only when CONFIG_PCI
authorMarkus Armbruster <armbru@redhat.com>
Thu, 1 Dec 2022 12:11:25 +0000 (13:11 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 19 Dec 2022 15:21:56 +0000 (16:21 +0100)
We compile pci-hmp-cmds.c always, but pci-qmp-cmds.c only when
CONFIG_PCI.  hw/pci/pci-stub.c keeps the linker happy when
!CONFIG_PCI.  Build pci-hmp-cmds.c that way, too.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20221201121133.3813857-6-armbru@redhat.com>

hw/pci/meson.build
hw/pci/pci-stub.c

index e42a133f3ad6c8a121fc5f8ee034d3088364ce21..4fcd888b2749797925363d8ae6ef80a4911eddca 100644 (file)
@@ -5,6 +5,7 @@ pci_ss.add(files(
   'pci.c',
   'pci_bridge.c',
   'pci_host.c',
+  'pci-hmp-cmds.c',
   'pci-qmp-cmds.c',
   'pcie_sriov.c',
   'shpc.c',
@@ -20,4 +21,3 @@ softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
 
 softmmu_ss.add(when: 'CONFIG_PCI', if_false: files('pci-stub.c'))
 softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('pci-stub.c'))
-softmmu_ss.add(files('pci-hmp-cmds.c'))
index f29ecc999e9cfe22df7ca8f8bb7f9788015f94bc..01d20a2f67af652f54aa03d541cecfe8eb431fb5 100644 (file)
@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "sysemu/sysemu.h"
 #include "monitor/monitor.h"
+#include "monitor/hmp.h"
 #include "qapi/qapi-commands-pci.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/msi.h"
@@ -34,6 +35,10 @@ PciInfoList *qmp_query_pci(Error **errp)
     return NULL;
 }
 
+void hmp_info_pci(Monitor *mon, const QDict *qdict)
+{
+}
+
 void hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict)
 {
     monitor_printf(mon, "PCI devices not supported\n");