libxl: return an error if connection to xenstore fails

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
Ian Campbell committed 2010-12-10 18:29:50 +00:00
1 parent af14d5a195
commit c17ffaf89f
1 file changed
+6
+6
View File
@@ -429,6 +429,11 @@ int libxl__wait_for_device_model(libxl_ctx *ctx,
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;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.