aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_utils.h
diff options
context:
space:
mode:
authorIan Jackson <ian.jackson@eu.citrix.com>2011-01-28 16:43:53 +0000
committerIan Jackson <ian.jackson@eu.citrix.com>2011-01-28 16:43:53 +0000
commita76377f10e9df051a820c55ab83ed9fffa7e9a53 (patch)
treed6db568ae273229f41b67636ed7967212cbaaadc /tools/libxl/libxl_utils.h
parent4df98b33c284d5f0e923e67b78a66d679636ca10 (diff)
downloadxen-a76377f10e9df051a820c55ab83ed9fffa7e9a53.tar.gz
xen-a76377f10e9df051a820c55ab83ed9fffa7e9a53.tar.bz2
xen-a76377f10e9df051a820c55ab83ed9fffa7e9a53.zip
libxl: correct error path in libxl_userdata_retrieve
Firstly, if libxl_read_file_contents fails, it doesn't really leave *data and *datalen_r undefined - it leaves them unchanged. Tighten up the spec for the benefit of libxl_userdata_retrieve. Secondly, libxl_userdata_retrieve ignored errors, assuming they were all ENOENT. Instead it should fail on unexpected errors. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Jim Fehlig <jfehlig@novell.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_utils.h')
-rw-r--r--tools/libxl/libxl_utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libxl/libxl_utils.h b/tools/libxl/libxl_utils.h
index 3ec67e5eb0..348dd79864 100644
--- a/tools/libxl/libxl_utils.h
+++ b/tools/libxl/libxl_utils.h
@@ -36,7 +36,7 @@ int libxl_read_file_contents(libxl_ctx *ctx, const char *filename,
/* Reads the contents of the plain file filename into a mallocd
* buffer. Returns 0 or errno. Any errors other than ENOENT are logged.
* If the file is empty, *data_r and *datalen_r are set to 0.
- * On error, *data_r and *datalen_r are undefined.
+ * On error, *data_r and *datalen_r are unchanged.
* data_r and/or datalen_r may be 0.
*/