Re: [PATCH] Fix errno return in safezero()

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

 



On 06/14/2011 08:58 AM, Daniel P. Berrange wrote:
> Most of the safezero() implementations return -1 on error,
> setting errno. The safezero() impl using posix_fallocate()
> though returned a positive errno value on error (due to
> the unusual API contract of posix_fallocate() compared to
> most syscall APIs).
> 
> * src/util/util.c: Ensure safezero() returns -1 and sets
>   errno on error.
> * src/storage/storage_backend.c: Change safezero != 0 to
>   < 0 for detecting errors
> ---
>  src/storage/storage_backend.c |    4 ++--
>  src/util/util.c               |    6 +++++-
>  2 files changed, 7 insertions(+), 3 deletions(-)

ACK.  How'd you spot this?

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]