Browse Source

[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>
tags/v1.20.1
Ladi Prosek 8 years ago
parent
commit
040aa980d6
1 changed files with 7 additions and 7 deletions
  1. 7
    7
      src/drivers/bus/virtio-pci.c

+ 7
- 7
src/drivers/bus/virtio-pci.c View File

253
                           &length);
253
                           &length);
254
 
254
 
255
     if (length <= start) {
255
     if (length <= start) {
256
-        DBG("VIRTIO-PCI bad capability len %u (>%u expected)\n", length, start);
256
+        DBG("VIRTIO-PCI bad capability len %d (>%d expected)\n", length, start);
257
         return -EINVAL;
257
         return -EINVAL;
258
     }
258
     }
259
     if (length - start < minlen) {
259
     if (length - start < minlen) {
260
-        DBG("VIRTIO-PCI bad capability len %u (>=%zu expected)\n", length, minlen);
260
+        DBG("VIRTIO-PCI bad capability len %d (>=%zd expected)\n", length, minlen);
261
         return -EINVAL;
261
         return -EINVAL;
262
     }
262
     }
263
     length -= start;
263
     length -= start;
264
     if (start + offset < offset) {
264
     if (start + offset < offset) {
265
-        DBG("VIRTIO-PCI map wrap-around %u+%u\n", start, offset);
265
+        DBG("VIRTIO-PCI map wrap-around %d+%d\n", start, offset);
266
         return -EINVAL;
266
         return -EINVAL;
267
     }
267
     }
268
     offset += start;
268
     offset += start;
269
     if (offset & (align - 1)) {
269
     if (offset & (align - 1)) {
270
-        DBG("VIRTIO-PCI offset %u not aligned to %u\n", offset, align);
270
+        DBG("VIRTIO-PCI offset %d not aligned to %d\n", offset, align);
271
         return -EINVAL;
271
         return -EINVAL;
272
     }
272
     }
273
     if (length > size) {
273
     if (length > size) {
276
 
276
 
277
     if (minlen + offset < minlen ||
277
     if (minlen + offset < minlen ||
278
         minlen + offset > pci_bar_size(pci, PCI_BASE_ADDRESS(bar))) {
278
         minlen + offset > pci_bar_size(pci, PCI_BASE_ADDRESS(bar))) {
279
-        DBG("VIRTIO-PCI map virtio %zu@%u out of range on bar %i length %lu\n",
279
+        DBG("VIRTIO-PCI map virtio %zd@%d out of range on bar %i length %ld\n",
280
             minlen, offset,
280
             minlen, offset,
281
-            bar, (unsigned long)pci_bar_size(pci, PCI_BASE_ADDRESS(bar)));
281
+            bar, pci_bar_size(pci, PCI_BASE_ADDRESS(bar)));
282
         return -EINVAL;
282
         return -EINVAL;
283
     }
283
     }
284
 
284
 
354
             return -ENOENT;
354
             return -ENOENT;
355
 
355
 
356
         if (size & (size - 1)) {
356
         if (size & (size - 1)) {
357
-            DBG("VIRTIO-PCI %p: bad queue size %u", vdev, size);
357
+            DBG("VIRTIO-PCI %p: bad queue size %d", vdev, size);
358
             return -EINVAL;
358
             return -EINVAL;
359
         }
359
         }
360
 
360
 

Loading…
Cancel
Save