summaryrefslogtreecommitdiffstats
path: root/src/drivers/bus
diff options
context:
space:
mode:
authorLadi Prosek2016-05-31 10:12:12 +0200
committerMichael Brown2016-06-20 15:23:53 +0200
commit040aa980d630e45cb6d9e5fbaf5719b814accd5f (patch)
treea896b9bd98a38136e92d13d8fab42d30ea34a935 /src/drivers/bus
parent[virtio] Renumber virtio_pci_region flags (diff)
downloadipxe-040aa980d630e45cb6d9e5fbaf5719b814accd5f.tar.gz
ipxe-040aa980d630e45cb6d9e5fbaf5719b814accd5f.tar.xz
ipxe-040aa980d630e45cb6d9e5fbaf5719b814accd5f.zip
[virtio] Fix virtio-pci logging
iPXE debug logging doesn't support %u. This commit replaces it with %d in virtio-pci debug format strings. Signed-off-by: Ladi Prosek <lprosek@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/bus')
-rw-r--r--src/drivers/bus/virtio-pci.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/drivers/bus/virtio-pci.c b/src/drivers/bus/virtio-pci.c
index a1c805a8..3311595f 100644
--- a/src/drivers/bus/virtio-pci.c
+++ b/src/drivers/bus/virtio-pci.c
@@ -253,21 +253,21 @@ int virtio_pci_map_capability(struct pci_device *pci, int cap, size_t minlen,
&length);
if (length <= start) {
- DBG("VIRTIO-PCI bad capability len %u (>%u expected)\n", length, start);
+ DBG("VIRTIO-PCI bad capability len %d (>%d expected)\n", length, start);
return -EINVAL;
}
if (length - start < minlen) {
- DBG("VIRTIO-PCI bad capability len %u (>=%zu expected)\n", length, minlen);
+ DBG("VIRTIO-PCI bad capability len %d (>=%zd expected)\n", length, minlen);
return -EINVAL;
}
length -= start;
if (start + offset < offset) {
- DBG("VIRTIO-PCI map wrap-around %u+%u\n", start, offset);
+ DBG("VIRTIO-PCI map wrap-around %d+%d\n", start, offset);
return -EINVAL;
}
offset += start;
if (offset & (align - 1)) {
- DBG("VIRTIO-PCI offset %u not aligned to %u\n", offset, align);
+ DBG("VIRTIO-PCI offset %d not aligned to %d\n", offset, align);
return -EINVAL;
}
if (length > size) {
@@ -276,9 +276,9 @@ int virtio_pci_map_capability(struct pci_device *pci, int cap, size_t minlen,
if (minlen + offset < minlen ||
minlen + offset > pci_bar_size(pci, PCI_BASE_ADDRESS(bar))) {
- DBG("VIRTIO-PCI map virtio %zu@%u out of range on bar %i length %lu\n",
+ DBG("VIRTIO-PCI map virtio %zd@%d out of range on bar %i length %ld\n",
minlen, offset,
- bar, (unsigned long)pci_bar_size(pci, PCI_BASE_ADDRESS(bar)));
+ bar, pci_bar_size(pci, PCI_BASE_ADDRESS(bar)));
return -EINVAL;
}
@@ -354,7 +354,7 @@ int vpm_find_vqs(struct virtio_pci_modern_device *vdev,
return -ENOENT;
if (size & (size - 1)) {
- DBG("VIRTIO-PCI %p: bad queue size %u", vdev, size);
+ DBG("VIRTIO-PCI %p: bad queue size %d", vdev, size);
return -EINVAL;
}