aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_xshelp.c
diff options
context:
space:
mode:
authorIan Jackson <ian.jackson@eu.citrix.com>2011-12-12 17:48:37 +0000
committerIan Jackson <ian.jackson@eu.citrix.com>2011-12-12 17:48:37 +0000
commit1eacd68b8a9daa3690cbdb4d71514fa36b7aad82 (patch)
tree06aa013df5eba8f34baf3041a92b2f64226e47e8 /tools/libxl/libxl_xshelp.c
parent0eefd1091284ac85e403cbe68ed133b51b7f046a (diff)
downloadxen-1eacd68b8a9daa3690cbdb4d71514fa36b7aad82.tar.gz
xen-1eacd68b8a9daa3690cbdb4d71514fa36b7aad82.tar.bz2
xen-1eacd68b8a9daa3690cbdb4d71514fa36b7aad82.zip
libxl: Make libxl__xs_* more const-correct
Paths and values which are not modified by these functions should be declared as "const char *" not "char *". Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_xshelp.c')
-rw-r--r--tools/libxl/libxl_xshelp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/libxl/libxl_xshelp.c b/tools/libxl/libxl_xshelp.c
index 4b09be3ce7..bc4e7e4c7f 100644
--- a/tools/libxl/libxl_xshelp.c
+++ b/tools/libxl/libxl_xshelp.c
@@ -49,7 +49,7 @@ char **libxl__xs_kvs_of_flexarray(libxl__gc *gc, flexarray_t *array, int length)
}
int libxl__xs_writev(libxl__gc *gc, xs_transaction_t t,
- char *dir, char *kvs[])
+ const char *dir, char *kvs[])
{
libxl_ctx *ctx = libxl__gc_owner(gc);
char *path;
@@ -69,7 +69,7 @@ int libxl__xs_writev(libxl__gc *gc, xs_transaction_t t,
}
int libxl__xs_write(libxl__gc *gc, xs_transaction_t t,
- char *path, const char *fmt, ...)
+ const char *path, const char *fmt, ...)
{
libxl_ctx *ctx = libxl__gc_owner(gc);
char *s;
@@ -87,7 +87,7 @@ int libxl__xs_write(libxl__gc *gc, xs_transaction_t t,
return 0;
}
-char * libxl__xs_read(libxl__gc *gc, xs_transaction_t t, char *path)
+char * libxl__xs_read(libxl__gc *gc, xs_transaction_t t, const char *path)
{
libxl_ctx *ctx = libxl__gc_owner(gc);
char *ptr;
@@ -113,7 +113,8 @@ char *libxl__xs_get_dompath(libxl__gc *gc, uint32_t domid)
return s;
}
-char **libxl__xs_directory(libxl__gc *gc, xs_transaction_t t, char *path, unsigned int *nb)
+char **libxl__xs_directory(libxl__gc *gc, xs_transaction_t t,
+ const char *path, unsigned int *nb)
{
libxl_ctx *ctx = libxl__gc_owner(gc);
char **ret = NULL;