From 88c8be67d407b296beac5e8b57128d3af1691295 Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Sun, 3 Apr 2016 20:36:40 +0200 Subject: [PATCH] Move capability formatting together All sub-PCI capabilities should be next to each other for clarity. Signed-off-by: Martin Kletzander --- docs/schemas/nodedev.rng | 22 +++++++++---------- src/conf/node_device_conf.c | 9 ++++---- .../pci_0000_00_1c_0_header_type.xml | 2 +- 3 files changed, 16 insertions(+), 17 deletions(-) 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 +
- -- 2.47.2