diff mbox series

[PULL,09/11] hw/vfio/pci: fix vfio_pci_hot_reset_result trace point

Message ID 165187013241.4166595.5526182306764482522.stgit@omen (mailing list archive)
State New, archived
Headers show
Series [PULL,01/11] vfio: simplify the conditional statements in vfio_msi_enable | expand

Commit Message

Alex Williamson May 6, 2022, 8:48 p.m. UTC
From: Eric Auger <eric.auger@redhat.com>

"%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>
 hw/vfio/pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index ef9d7bf326de..cb912bd3f4b2 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -2380,7 +2380,7 @@  static int vfio_pci_hot_reset(VFIOPCIDevice *vdev, bool single)
-                                    ret ? "%m" : "Success");
+                                    ret ? strerror(errno) : "Success");
     /* Re-enable INTx on affected devices */