This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] [PATCH 4/6] libxl: internals: document the error behaviour o

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

Also fix a >75 column line.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
 tools/libxl/libxl_internal.h |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index d58b483..1e277ae 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -140,13 +140,21 @@ _hidden char *libxl__strdup(libxl__gc *gc, const char *c);
 _hidden char *libxl__dirname(libxl__gc *gc, const char *s);
 _hidden char **libxl__xs_kvs_of_flexarray(libxl__gc *gc, flexarray_t *array, 
int length);
 _hidden int libxl__xs_writev(libxl__gc *gc, xs_transaction_t t,
                     char *dir, char **kvs);
 _hidden int libxl__xs_write(libxl__gc *gc, xs_transaction_t t,
                    char *path, char *fmt, ...) PRINTF_ATTRIBUTE(4, 5);
-_hidden char *libxl__xs_get_dompath(libxl__gc *gc, uint32_t domid); // logs 
+   /* Each fn returns 0 on success.
+    * On error: returns -1, sets errno (no logging) */
+_hidden char *libxl__xs_get_dompath(libxl__gc *gc, uint32_t domid);
+   /* On error: logs, returns NULL, sets errno. */
 _hidden char *libxl__xs_read(libxl__gc *gc, xs_transaction_t t, char *path);
-_hidden char **libxl__xs_directory(libxl__gc *gc, xs_transaction_t t, char 
*path, unsigned int *nb);
+_hidden char **libxl__xs_directory(libxl__gc *gc, xs_transaction_t t,
+                                   char *path, unsigned int *nb);
+   /* On error: returns NULL, sets errno (no logging) */
 /* from xl_dom */
 _hidden int libxl__domain_is_hvm(libxl_ctx *ctx, uint32_t domid);

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>