From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [PATCH 4/6] libxl: internals: document the error behaviour of various libxl__xs_* functions
Date: Thu, 27 Jan 2011 17:41:02 +0000 [thread overview]
Message-ID: <1296150064-31991-5-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1296150064-31991-4-git-send-email-ian.jackson@eu.citrix.com>
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>
---
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
next prev parent reply other threads:[~2011-01-27 17:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 17:40 [PATCH 0/6] libxl, xl: fix domain name uniqueness check Ian Jackson
2011-01-27 17:40 ` [PATCH 1/6] xl: Revert "xl: avoid creating domains with duplicate names" Ian Jackson
2011-01-27 17:41 ` [PATCH 2/6] libxl: fix error handling (xenstore transaction leak) in libxl__domain_make Ian Jackson
2011-01-27 17:41 ` [PATCH 3/6] libxl, xl: fixes to domain creation cleanup logic (domid values) Ian Jackson
2011-01-27 17:41 ` Ian Jackson [this message]
2011-01-27 17:41 ` [PATCH 5/6] libxl: during domain destruction, do not complain if no devices dir to destroy Ian Jackson
2011-01-27 17:41 ` [PATCH 6/6] libxl: prevent creation of domains with duplicate names Ian Jackson
2011-01-27 18:33 ` [PATCH 3/6] libxl, xl: fixes to domain creation cleanup logic (domid values) Stefano Stabellini
2011-01-27 18:59 ` Ian Jackson
2011-01-27 20:01 ` Ian Jackson
2011-01-27 20:13 ` Gianni Tedesco
2011-01-28 12:22 ` Stefano Stabellini
2011-01-28 12:28 ` Ian Jackson
2011-01-28 13:27 ` Stefano Stabellini
2011-01-28 17:38 ` Ian Jackson
2011-01-28 17:52 ` Stefano Stabellini
2011-01-28 18:39 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1296150064-31991-5-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.