On 05/21/2014 07:24 AM, Anshul Makkar wrote:
> Hi,
> 
> Doesn't there exist a common header file for all the return codes. In the
> code I can see return values as 0, -1 etc.

Most functions that flag failure via the return value do so by returning
merely 0 or -1.  There's a few that return 0 or -errno.  More often,
instead of encoding error categories into a return value, we instead
prefer to use the QAPI error type 'struct Error' (see
include/qapi/error.h), which has categories for the few places where it
is needed, along with utility functions for setting error messages.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to