From: Eric Auger Date: Mon, 2 May 2022 09:42:21 +0000 (-0700) Subject: hw/vfio/pci: fix vfio_pci_hot_reset_result trace point X-Git-Tag: v7.1.0-rc0~113^2~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9d38ffc5d82839cdc9effb2e9ee84a6941a25e1a;p=users%2Fdwmw2%2Fqemu.git hw/vfio/pci: fix vfio_pci_hot_reset_result trace point "%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 Signed-off-by: Yi Liu 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 --- diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index ef9d7bf326..cb912bd3f4 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) 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 */