diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2022-10-04 12:35:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-04 12:35:12 +0100 |
commit | aa19ba90f73c9b456a03a03d0d453e79fd8cf2d9 (patch) | |
tree | 933e141b0490f443cd653954f92fd39fd24f69c3 /lib/pci.c | |
parent | 87c216d9492476c28eb306b8f4ba22a1269849cf (diff) | |
download | libvfio-user-aa19ba90f73c9b456a03a03d0d453e79fd8cf2d9.zip libvfio-user-aa19ba90f73c9b456a03a03d0d453e79fd8cf2d9.tar.gz libvfio-user-aa19ba90f73c9b456a03a03d0d453e79fd8cf2d9.tar.bz2 |
fix compilation for i386 and ppc64 (#709)
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: John Levon <john.levon@nutanix.com>
Reported-by: Eduardo Lima <eblima@gmail.com>
Diffstat (limited to 'lib/pci.c')
-rw-r--r-- | lib/pci.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -264,8 +264,8 @@ pci_hdr_write(vfu_ctx_t *vfu_ctx, const char *buf, loff_t offset) ret = handle_erom_write(vfu_ctx, cfg_space, buf); break; default: - vfu_log(vfu_ctx, LOG_ERR, "PCI config write %#lx not handled", - offset); + vfu_log(vfu_ctx, LOG_ERR, "PCI config write %#llx not handled", + (ull_t)offset); ret = ERROR_INT(EINVAL); } @@ -315,7 +315,7 @@ pci_nonstd_access(vfu_ctx_t *vfu_ctx, char *buf, size_t count, if (is_write) { vfu_log(vfu_ctx, LOG_ERR, "no callback for write to config space " - "offset %lu size %zu", offset, count); + "offset %#llx size %zu", (ull_t)offset, count); return ERROR_INT(EINVAL); } @@ -429,8 +429,10 @@ pci_config_space_access(vfu_ctx_t *vfu_ctx, char *buf, size_t count, size = pci_config_space_next_segment(vfu_ctx, count, offset, is_write, &cb); if (cb == NULL) { - vfu_log(vfu_ctx, LOG_ERR, "bad write to PCI config space %#lx-%#lx", - offset, offset + count - 1); + vfu_log(vfu_ctx, LOG_ERR, + "bad write to PCI config space %#llx-%#llx", + (ull_t)offset, + (ull_t)(offset + count - 1)); return size; } |