Skip to content

Commit

Permalink
hw/vfio/pci: fix vfio_pci_hot_reset_result trace point
Browse files Browse the repository at this point in the history
"%m" format specifier is not interpreted by the trace infrastructure
and thus "%m" is output instead of the actual errno string. Fix it by
outputting strerror(errno).

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Link: https://lore.kernel.org/r/20220502094223.36384-2-yi.l.liu@intel.com
[aw: replace commit log as provided by Eric]
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
  • Loading branch information
eauger authored and taylorsimpson committed May 9, 2022
1 parent 18ff358 commit 530c313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/vfio/pci.c
Expand Up @@ -2380,7 +2380,7 @@ static int vfio_pci_hot_reset(VFIOPCIDevice *vdev, bool single)
g_free(reset);

trace_vfio_pci_hot_reset_result(vdev->vbasedev.name,
ret ? "%m" : "Success");
ret ? strerror(errno) : "Success");

out:
/* Re-enable INTx on affected devices */
Expand Down

0 comments on commit 530c313

Please sign in to comment.