qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-2.12 10/12] vhdx: Don't use error_setg_errno


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH for-2.12 10/12] vhdx: Don't use error_setg_errno() with constant errno
Date: Tue, 20 Mar 2018 13:45:02 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 03/20/2018 12:36 PM, Kevin Wolf wrote:
error_setg_errno() is meant for cases where we got an errno from the OS
that can add useful extra information to an error message. It's
pointless if we pass a constant errno, these cases should use plain
error_setg().

Well, it DOES let you get the libc-specific spelling of the strerror for that errno (not all libc report the same string) - but you're right that it didn't add much here.


Signed-off-by: Kevin Wolf <address@hidden>
---
  block/vhdx.c | 9 ++++-----
  1 file changed, 4 insertions(+), 5 deletions(-)

Reviewed-by: Eric Blake <address@hidden>

--
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]