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

[Xen-devel] [PATCH 4/6] 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@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 
errs
+   /* 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);
-- 
1.5.6.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.