qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Auger <eric.auger@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>,
	Yi Liu <yi.l.liu@intel.com>
Cc: kevin.tian@intel.com, qemu-devel@nongnu.org, eric.auger.pro@gmail.com
Subject: Re: [Patch 1/3] hw/vfio/pci: fix vfio_pci_hot_reset_result trace point
Date: Mon, 2 May 2022 16:43:19 +0200	[thread overview]
Message-ID: <87ab9235-2de7-6843-8e7a-1f2b527e8752@redhat.com> (raw)
In-Reply-To: <20220502083529.4c2f792b.alex.williamson@redhat.com>

Hi Alex,

On 5/2/22 16:35, Alex Williamson wrote:
> On Mon,  2 May 2022 02:42:21 -0700
> Yi Liu <yi.l.liu@intel.com> wrote:
>
>> From: Eric Auger <eric.auger@redhat.com>
>>
>> Properly output the errno string.
> More explanation please, why is it broken and how does this fix it?
> Thanks,
"%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).

Thanks

Eric

>
> Alex
>  
>> Signed-off-by: Eric Auger <eric.auger@redhat.com>
>> Signed-off-by: Yi Liu <yi.l.liu@intel.com>
>> ---
>>  hw/vfio/pci.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
>> index 9fd9faee1d..4a66376be6 100644
>> --- a/hw/vfio/pci.c
>> +++ b/hw/vfio/pci.c
>> @@ -2337,7 +2337,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 */



  reply	other threads:[~2022-05-02 14:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02  9:42 [Patch 0/3] vfio: Misc cleanups Yi Liu
2022-05-02  9:42 ` [Patch 1/3] hw/vfio/pci: fix vfio_pci_hot_reset_result trace point Yi Liu
2022-05-02 14:35   ` Alex Williamson
2022-05-02 14:43     ` Eric Auger [this message]
2022-05-02  9:42 ` [Patch 2/3] vfio/pci: Use vbasedev local variable in vfio_realize() Yi Liu
2022-05-02  9:42 ` [Patch 3/3] vfio/common: Rename VFIOGuestIOMMU::iommu into ::iommu_mr Yi Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ab9235-2de7-6843-8e7a-1f2b527e8752@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=kevin.tian@intel.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yi.l.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).