[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 06/11] error: Use error_reportf_err() where appropriate
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 06/11] error: Use error_reportf_err() where appropriate |
Date: |
Mon, 27 Apr 2020 10:53:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Eric Blake <address@hidden> writes:
> On 4/24/20 2:20 PM, Markus Armbruster wrote:
>> Replace
>>
>> error_report("...: %s", ..., error_get_pretty(err));
>>
>> by
>>
>> error_reportf_err(err, "...: ", ...);
>
> Reviewed-by: Eric Blake <address@hidden>
>
>>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>> chardev/char-socket.c | 5 +++--
>> hw/sd/pxa2xx_mmci.c | 4 ++--
>> hw/sd/sd.c | 4 ++--
>> hw/usb/dev-mtp.c | 9 +++++----
>> qemu-nbd.c | 7 +++----
>> scsi/qemu-pr-helper.c | 4 ++--
>> 6 files changed, 17 insertions(+), 16 deletions(-)
>
> Although it touches NBD, I'm happy for this to go through your tree
> with the larger series.
>
>> +++ b/qemu-nbd.c
>> @@ -856,8 +856,7 @@ int main(int argc, char **argv)
>> }
>> tlscreds = nbd_get_tls_creds(tlscredsid, list, &local_err);
>> if (local_err) {
>> - error_report("Failed to get TLS creds %s",
>> - error_get_pretty(local_err));
>> + error_reportf_err(local_err, "Failed to get TLS creds ");
>
> Odd one out for not using ':' in the message, but that's independent
> of this patch.
The patch is short enough to deviate from "purely mechanical" and stick
in ':' here. Your choice.
Thanks!
[PATCH 03/11] s390x/cpumodel: Fix harmless misuse of visit_check_struct(), Markus Armbruster, 2020/04/24