path: root/hw/pci-stub.c
diff options
authorLuiz Capitulino <lcapitulino@redhat.com>2011-10-21 14:15:33 -0200
committerLuiz Capitulino <lcapitulino@redhat.com>2011-10-27 11:48:47 -0200
commit79627472db3629de66fe81019560aa9cb6900268 (patch)
treee7763469c274fddd82d01c60af52dcc8285154f4 /hw/pci-stub.c
parent96637bcdf9e00db77265229d3d30d952bdde74be (diff)
qapi: Convert query-pci
This also fixes a bug with the old version: QMP would invert device id and vendor id. This would look ok on HMP because it was printing "device:vendor" instead of "vendor:device". Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'hw/pci-stub.c')
1 files changed, 6 insertions, 9 deletions
diff --git a/hw/pci-stub.c b/hw/pci-stub.c
index 1fb105d51..636171c16 100644
--- a/hw/pci-stub.c
+++ b/hw/pci-stub.c
@@ -21,20 +21,17 @@
#include "sysemu.h"
#include "monitor.h"
#include "pci.h"
+#include "qmp-commands.h"
-static void pci_error_message(Monitor *mon)
+PciInfoList *qmp_query_pci(Error **errp)
- monitor_printf(mon, "PCI devices not supported\n");
+ error_set(errp, QERR_UNSUPPORTED);
+ return NULL;
-void do_pci_info(Monitor *mon, QObject **ret_data)
- pci_error_message(mon);
-void do_pci_info_print(Monitor *mon, const QObject *data)
+static void pci_error_message(Monitor *mon)
- pci_error_message(mon);
+ monitor_printf(mon, "PCI devices not supported\n");
int do_pcie_aer_inejct_error(Monitor *mon,