]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[virtio] Fix virtio-pci logging
authorLadi Prosek <lprosek@redhat.com>
Tue, 31 May 2016 08:12:12 +0000 (10:12 +0200)
committerMichael Brown <mcb30@ipxe.org>
Mon, 20 Jun 2016 13:23:53 +0000 (14:23 +0100)
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>
src/drivers/bus/virtio-pci.c

index a1c805a875db2fa96a7ac4c80d6a55d4cb133bc9..3311595fb2ad20b374698dbac69648d48d581539 100644 (file)
@@ -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;
         }