aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_xshelp.c
diff options
context:
space:
mode:
authorAnthony PERARD <anthony.perard@citrix.com>2011-11-04 12:38:23 +0000
committerAnthony PERARD <anthony.perard@citrix.com>2011-11-04 12:38:23 +0000
commit6291ab8bf8317537953e1fee900100fd72f8cb63 (patch)
treeb768708b72777ffc3c45c27798626d0cc9e29028 /tools/libxl/libxl_xshelp.c
parent46e9ab5b1c86bded86eb95c124839c4db1b7c5fa (diff)
downloadxen-6291ab8bf8317537953e1fee900100fd72f8cb63.tar.gz
xen-6291ab8bf8317537953e1fee900100fd72f8cb63.tar.bz2
xen-6291ab8bf8317537953e1fee900100fd72f8cb63.zip
libxl: libxl: Introduce dm-version xenstore key.
The all key is /libxl/$domid/dm-version. The /libxl/$domid dir is created with the domain and should be only accessible by the toolstack domain. The function libxl__xs_libxl_path() give this path. This come with libxl__device_model_version_running() helper function. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_xshelp.c')
-rw-r--r--tools/libxl/libxl_xshelp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/libxl/libxl_xshelp.c b/tools/libxl/libxl_xshelp.c
index e41f962eef..4b09be3ce7 100644
--- a/tools/libxl/libxl_xshelp.c
+++ b/tools/libxl/libxl_xshelp.c
@@ -122,6 +122,15 @@ char **libxl__xs_directory(libxl__gc *gc, xs_transaction_t t, char *path, unsign
return ret;
}
+char *libxl__xs_libxl_path(libxl__gc *gc, uint32_t domid)
+{
+ libxl_ctx *ctx = libxl__gc_owner(gc);
+ char *s = libxl__sprintf(gc, "/libxl/%i", domid);
+ if (!s)
+ LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "cannot allocate create paths");
+ return s;
+}
+
/*
* Local variables:
* mode: C