[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 16/28] libxl: emuids: Provide libxl__dm_xs_path_rel
This gives a relative path, suitable for driver domains. It will be used shortly. No functional change. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- v6: New patch --- tools/libxl/libxl_internal.c | 10 ++++++++-- tools/libxl/libxl_internal.h | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c index 843fdbf..d0c98b0 100644 --- a/tools/libxl/libxl_internal.c +++ b/tools/libxl/libxl_internal.c @@ -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); diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 4a9003d..2248509 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -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: * -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |