From: Martin Kletzander Date: Sun, 3 Apr 2016 18:36:40 +0000 (+0200) Subject: Move capability formatting together X-Git-Tag: v1.3.5-rc1~466 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88c8be67d407b296beac5e8b57128d3af1691295;p=thirdparty%2Flibvirt.git Move capability formatting together All sub-PCI capabilities should be next to each other for clarity. Signed-off-by: Martin Kletzander --- diff --git a/docs/schemas/nodedev.rng b/docs/schemas/nodedev.rng index d937513048..6b9b54298b 100644 --- a/docs/schemas/nodedev.rng +++ b/docs/schemas/nodedev.rng @@ -148,6 +148,17 @@ + + + + + pci-bridge + cardbus-bridge + + + + + @@ -169,17 +180,6 @@ - - - - - pci-bridge - cardbus-bridge - - - - - diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index e7e4bbd390..96ec6a0037 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -383,6 +383,10 @@ char *virNodeDeviceDefFormat(const virNodeDeviceDef *def) virBufferAddLit(&buf, "\n"); } } + if (data->pci_dev.hdrType) { + virBufferAsprintf(&buf, "\n", + virPCIHeaderTypeToString(data->pci_dev.hdrType)); + } if (data->pci_dev.nIommuGroupDevices) { virBufferAsprintf(&buf, "\n", data->pci_dev.iommuGroupNumber); @@ -403,11 +407,6 @@ char *virNodeDeviceDefFormat(const virNodeDeviceDef *def) virBufferAsprintf(&buf, "\n", data->pci_dev.numa_node); - if (data->pci_dev.hdrType) { - virBufferAsprintf(&buf, "\n", - virPCIHeaderTypeToString(data->pci_dev.hdrType)); - } - if (data->pci_dev.flags & VIR_NODE_DEV_CAP_FLAG_PCIE) virPCIEDeviceInfoFormat(&buf, data->pci_dev.pci_express); break; diff --git a/tests/nodedevschemadata/pci_0000_00_1c_0_header_type.xml b/tests/nodedevschemadata/pci_0000_00_1c_0_header_type.xml index dea5f05237..c1be9f7d9c 100644 --- a/tests/nodedevschemadata/pci_0000_00_1c_0_header_type.xml +++ b/tests/nodedevschemadata/pci_0000_00_1c_0_header_type.xml @@ -8,10 +8,10 @@ 0 8 Series/C220 Series Chipset Family PCI Express Root Port #1 Intel Corporation +
-