From 6291ab8bf8317537953e1fee900100fd72f8cb63 Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Fri, 4 Nov 2011 12:38:23 +0000 Subject: 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 Committed-by: Ian Jackson --- tools/libxl/libxl_xshelp.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tools/libxl/libxl_xshelp.c') 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 -- cgit v1.2.3