From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzkI9-0000Hv-0h for qemu-devel@nongnu.org; Tue, 02 Jun 2015 07:23:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzkI8-0000Lk-8i for qemu-devel@nongnu.org; Tue, 02 Jun 2015 07:23:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzkI8-0000LJ-4K for qemu-devel@nongnu.org; Tue, 02 Jun 2015 07:23:32 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id C07F41BE351 for ; Tue, 2 Jun 2015 11:23:31 +0000 (UTC) From: Marcel Apfelbaum Date: Tue, 2 Jun 2015 14:23:05 +0300 Message-Id: <1433244192-27624-11-git-send-email-marcel@redhat.com> In-Reply-To: <1433244192-27624-1-git-send-email-marcel@redhat.com> References: <1433244192-27624-1-git-send-email-marcel@redhat.com> Subject: [Qemu-devel] [PATCH V8 10/17] hw/pci: removed 'rootbus nr is 0' assumption from qmp_pci_query List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: marcel@redhat.com, mst@redhat.com From: Marcel Apfelbaum Use the newer pci_bus_num to correctly get the root bus number. Signed-off-by: Marcel Apfelbaum --- hw/pci/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 3361d85..a956640 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1594,7 +1594,8 @@ PciInfoList *qmp_query_pci(Error **errp) QLIST_FOREACH(host_bridge, &pci_host_bridges, next) { info = g_malloc0(sizeof(*info)); - info->value = qmp_query_pci_bus(host_bridge->bus, 0); + info->value = qmp_query_pci_bus(host_bridge->bus, + pci_bus_num(host_bridge->bus)); /* XXX: waiting for the qapi to support GSList */ if (!cur_item) { -- 2.1.0