[libvirt] [PATCHv2 1/4] Change virFileOperation to return -errno (ie < 0) on error.
veillard at redhat.com
Wed Jul 21 15:11:28 UTC 2010
On Mon, Jul 19, 2010 at 09:21:52PM -0400, Laine Stump wrote:
> virFileOperation previously returned 0 on success, or the value of
> errno on failure. Although there are other functions in libvirt that
> use this convention, the preferred (and more common) convention is to
> return 0 on success and -errno (or simply -1 in some cases) on
> failure. This way the check for failure is always (ret < 0).
> * src/util/util.c - change virFileOperation and virFileOperationNoFork to
> return -errno on failure.
> * src/storage/storage_backend.c, src/qemu/qemu_driver.c
> - change the hook functions passed to virFileOperation to return
> -errno on failure.
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list