]> git.proxmox.com Git - mirror_qemu.git/commit
vfio/common: Fix wrong %m usages
authorAvihai Horon <avihaih@nvidia.com>
Tue, 7 Mar 2023 12:54:37 +0000 (12:54 +0000)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 7 Mar 2023 14:20:32 +0000 (07:20 -0700)
commitdb9b829b15999b47f3e4f6fbede743b6f8686110
treec7768757573bcef8d77d611843c1ed7788f08641
parent3e2413a6520e5b6d8360395b6b423332abfb3362
vfio/common: Fix wrong %m usages

There are several places where the %m conversion is used if one of
vfio_dma_map(), vfio_dma_unmap() or vfio_get_dirty_bitmap() fail.

The %m usage in these places is wrong since %m relies on errno value while
the above functions don't report errors via errno.

Fix it by using strerror() with the returned value instead.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20230307125450.62409-3-joao.m.martins@oracle.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/common.c