[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: return an error if connection to xenstore fails
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1292005790 0 # Node ID 123cefc127820834c8c8223dac015975395fb1dc # Parent e5bb61a0ad09b37e890206e3044fec209136cafe libxl: return an error if connection to xenstore fails Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl_device.c | 6 ++++++ 1 files changed, 6 insertions(+) diff -r e5bb61a0ad09 -r 123cefc12782 tools/libxl/libxl_device.c --- a/tools/libxl/libxl_device.c Fri Dec 10 18:27:54 2010 +0000 +++ b/tools/libxl/libxl_device.c Fri Dec 10 18:29:50 2010 +0000 @@ -429,6 +429,11 @@ int libxl__wait_for_device_model(libxl_c char **l = NULL; xsh = xs_daemon_open(); + if (xsh == NULL) { + LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Unable to open xenstore connection"); + goto err; + } + path = libxl__sprintf(&gc, "/local/domain/0/device-model/%d/state", domid); xs_watch(xsh, path, path); tv.tv_sec = LIBXL_DEVICE_MODEL_START_TIMEOUT; @@ -469,6 +474,7 @@ again: xs_unwatch(xsh, path, path); xs_daemon_close(xsh); LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Device Model not ready"); +err: libxl__free_all(&gc); return -1; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |