Skip to content

Commit

Permalink
contrib/libvhost-user: switch to uint64_t
Browse files Browse the repository at this point in the history
contrib/libvhost-user is now using __u64 which is
a long long. New linux headers will use uint64_t.

These need to be printed differently: llx versus PRIx64.

For now cast to uint64_t for portability so the change
does not break the build.

Casts will go away in the future.

Signed-off-by: Michael S. Tsirkin <[email protected]>
  • Loading branch information
mstsirkin committed Feb 4, 2019
1 parent 7423192 commit 9174d8a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions contrib/libvhost-user/libvhost-user.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,10 +790,10 @@ vu_set_vring_addr_exec(VuDev *dev, VhostUserMsg *vmsg)
DPRINT("vhost_vring_addr:\n");
DPRINT(" index: %d\n", vra->index);
DPRINT(" flags: %d\n", vra->flags);
DPRINT(" desc_user_addr: 0x%016llx\n", vra->desc_user_addr);
DPRINT(" used_user_addr: 0x%016llx\n", vra->used_user_addr);
DPRINT(" avail_user_addr: 0x%016llx\n", vra->avail_user_addr);
DPRINT(" log_guest_addr: 0x%016llx\n", vra->log_guest_addr);
DPRINT(" desc_user_addr: 0x%016" PRIx64 "\n", (uint64_t)vra->desc_user_addr);
DPRINT(" used_user_addr: 0x%016" PRIx64 "\n", (uint64_t)vra->used_user_addr);
DPRINT(" avail_user_addr: 0x%016" PRIx64 "\n", (uint64_t)vra->avail_user_addr);
DPRINT(" log_guest_addr: 0x%016" PRIx64 "\n", (uint64_t)vra->log_guest_addr);

vq->vring.flags = vra->flags;
vq->vring.desc = qva_to_va(dev, vra->desc_user_addr);
Expand Down

0 comments on commit 9174d8a

Please sign in to comment.