debuggers.hg

changeset 22889:5eaf9405ed51

libxl: internals: document the error behaviour of various libxl__xs_* functions

Many of the functions in libxl_xshelp.c simply return 0 on error, and
leave the errno value from xenstore in errno. Document this more
clearly.

Also fix a >75 column line.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Ian Jackson <Ian.Jackson@eu.citrix.com>
date Fri Jan 28 18:37:25 2011 +0000 (2011-01-28)
parents ccfa0527893e
children 29eaad8e388a
files tools/libxl/libxl_internal.h
line diff
     1.1 --- a/tools/libxl/libxl_internal.h	Fri Jan 28 18:36:54 2011 +0000
     1.2 +++ b/tools/libxl/libxl_internal.h	Fri Jan 28 18:37:25 2011 +0000
     1.3 @@ -140,13 +140,21 @@ static inline libxl_ctx *libxl__gc_owner
     1.4  _hidden char *libxl__dirname(libxl__gc *gc, const char *s);
     1.5  
     1.6  _hidden char **libxl__xs_kvs_of_flexarray(libxl__gc *gc, flexarray_t *array, int length);
     1.7 +
     1.8  _hidden int libxl__xs_writev(libxl__gc *gc, xs_transaction_t t,
     1.9                      char *dir, char **kvs);
    1.10  _hidden int libxl__xs_write(libxl__gc *gc, xs_transaction_t t,
    1.11                     char *path, char *fmt, ...) PRINTF_ATTRIBUTE(4, 5);
    1.12 -_hidden char *libxl__xs_get_dompath(libxl__gc *gc, uint32_t domid); // logs errs
    1.13 +   /* Each fn returns 0 on success.
    1.14 +    * On error: returns -1, sets errno (no logging) */
    1.15 +
    1.16 +_hidden char *libxl__xs_get_dompath(libxl__gc *gc, uint32_t domid);
    1.17 +   /* On error: logs, returns NULL, sets errno. */
    1.18 +
    1.19  _hidden char *libxl__xs_read(libxl__gc *gc, xs_transaction_t t, char *path);
    1.20 -_hidden char **libxl__xs_directory(libxl__gc *gc, xs_transaction_t t, char *path, unsigned int *nb);
    1.21 +_hidden char **libxl__xs_directory(libxl__gc *gc, xs_transaction_t t,
    1.22 +                                   char *path, unsigned int *nb);
    1.23 +   /* On error: returns NULL, sets errno (no logging) */
    1.24  
    1.25  /* from xl_dom */
    1.26  _hidden int libxl__domain_is_hvm(libxl_ctx *ctx, uint32_t domid);