virNodeDeviceCapPCIDefFormat: Use %u for unsigned values

'bus', 'slot' and 'function' are unsigned int variables parsed as
unsigned int, but were formated as signed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2022-10-04 16:47:38 +02:00
parent c0cbdd24d5
commit 3ae376535a
2 changed files with 4 additions and 4 deletions

View File

@ -323,10 +323,10 @@ virNodeDeviceCapPCIDefFormat(virBuffer *buf,
virBufferAsprintf(buf, "<class>0x%.6x</class>\n", data->pci_dev.klass);
virBufferAsprintf(buf, "<domain>%d</domain>\n",
data->pci_dev.domain);
virBufferAsprintf(buf, "<bus>%d</bus>\n", data->pci_dev.bus);
virBufferAsprintf(buf, "<slot>%d</slot>\n",
virBufferAsprintf(buf, "<bus>%u</bus>\n", data->pci_dev.bus);
virBufferAsprintf(buf, "<slot>%u</slot>\n",
data->pci_dev.slot);
virBufferAsprintf(buf, "<function>%d</function>\n",
virBufferAsprintf(buf, "<function>%u</function>\n",
data->pci_dev.function);
virBufferAsprintf(buf, "<product id='0x%04x'",
data->pci_dev.product);

View File

@ -4,7 +4,7 @@
<capability type='pci'>
<class>0xffffff</class>
<domain>0</domain>
<bus>0</bus>
<bus>4294967295</bus>
<slot>2</slot>
<function>0</function>
<product id='0x0416'>4th Gen Core Processor Integrated Graphics Controller</product>