qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 06/11] error: Use error_reportf_err() where appropriate


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 06/11] error: Use error_reportf_err() where appropriate
Date: Mon, 27 Apr 2020 11:26:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 4/27/20 10:53 AM, Markus Armbruster wrote:
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.

Let's deviate, else we might forget about it.

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]