qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH v2] file-posix: Use error API prope


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v2] file-posix: Use error API properly
Date: Wed, 31 Oct 2018 11:53:26 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

On 10/31/18 11:05 AM, Philippe Mathieu-Daudé wrote:
On 31/10/18 15:57, Eric Blake wrote:
On 10/31/18 12:39 AM, Fam Zheng wrote:
...
-        fprintf(stderr, "%s: stat failed: %s\n",
-            fname, strerror(errno));
+        error_setg(errp, "%s: stat failed: %s", fname, strerror(errno));
          return -errno;

error_setg_errno() is nicer here.  In fact, should we have a Coverity script that looks for error_setg(... strerror())?


Coverity -> Coccinelle?

Yes. (Is it okay if I begin my defense with: They both start with "Co"?)

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

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