@@ -553,6 +553,12 @@ void libxl__update_domain_configuration(libxl__gc *gc,
dst->b_info.video_memkb = src->b_info.video_memkb;
}
+char *libxl__dm_xs_path_rel(libxl__gc *gc,
+ uint32_t domid, int emuid)
+{
+ return GCSPRINTF("device-model/%u", domid);
+}
+
char *libxl__device_model_xs_path(libxl__gc *gc, uint32_t dm_domid,
uint32_t domid, int emuid,
const char *format, ...)
@@ -560,8 +566,8 @@ char *libxl__device_model_xs_path(libxl__gc *gc, uint32_t dm_domid,
char *s, *fmt;
va_list ap;
- fmt = GCSPRINTF("/local/domain/%u/device-model/%u%s", dm_domid,
- domid, format);
+ fmt = GCSPRINTF("/local/domain/%u/%s%s", dm_domid,
+ libxl__dm_xs_path_rel(gc, domid, emuid), format);
va_start(ap, format);
s = libxl__vsprintf(gc, fmt, ap);
@@ -1982,6 +1982,10 @@ _hidden char *libxl__device_model_xs_path(libxl__gc *gc,
uint32_t domid, int emuid,
const char *format, ...) PRINTF_ATTRIBUTE(5, 6);
+_hidden char *libxl__dm_xs_path_rel(libxl__gc *gc,
+ uint32_t domid, int emuid);
+ /* returns relative path (ie assuming we are the toolstack) */
+
/*
* Calling context and GC for event-generating functions:
*
This gives a relative path, suitable for driver domains. It will be used shortly. No functional change. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> --- v6: New patch --- tools/libxl/libxl_internal.c | 10 ++++++++-- tools/libxl/libxl_internal.h | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-)