[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: events: libxl__xswait* support @paths
commit ffb46d64c37f520fac6574e90e263cb21f145c8d Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> AuthorDate: Fri Mar 14 17:38:38 2014 +0000 Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CommitDate: Mon Mar 17 15:53:59 2014 +0000 libxl: events: libxl__xswait* support @paths Special-case paths starting with '@' in libxl__xswait. Attempting to read these from xenstore gives EINVAL. Callers waiting for (say) @releaseDomain will be checking for some condition which can be observed other than by looking at xenstore. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- v3: New patch in this version of the series. --- tools/libxl/libxl_aoutils.c | 8 ++++++-- tools/libxl/libxl_internal.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_aoutils.c b/tools/libxl/libxl_aoutils.c index 477717b..1c9eb9e 100644 --- a/tools/libxl/libxl_aoutils.c +++ b/tools/libxl/libxl_aoutils.c @@ -69,8 +69,12 @@ void xswait_xswatch_callback(libxl__egc *egc, libxl__ev_xswatch *xsw, int rc; const char *data; - rc = libxl__xs_read_checked(gc, XBT_NULL, xswa->path, &data); - if (rc) { xswait_report_error(egc, xswa, rc); return; } + if (xswa->path[0] == '@') { + data = 0; + } else { + rc = libxl__xs_read_checked(gc, XBT_NULL, xswa->path, &data); + if (rc) { xswait_report_error(egc, xswa, rc); return; } + } xswa->callback(egc, xswa, 0, data); } diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index a208be7..a82a43d 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -1130,6 +1130,8 @@ typedef struct libxl__xswait_state libxl__xswait_state; * This HAS been logged. * xswait will not continue (but calling libxl__xswait_stop is OK). * + * xswait.path may start with with '@', in which case no read is done + * and the callback will always get data==0. */ typedef void libxl__xswait_callback(libxl__egc *egc, libxl__xswait_state *xswa, int rc, const char *data); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |