mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
libxl: give reasons for ctx init failures
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
This commit is contained in:
1 parent
b45cd94758
commit
fee4ddc4c2
1 file changed
+4
@@ -51,12 +51,16 @@ int libxl_ctx_init(struct libxl_ctx *ctx, int version, xentoollog_logger *lg)
|
||||
|
||||
ctx->xch = xc_interface_open(lg,lg,0);
|
||||
if (!ctx->xch) {
|
||||
XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, errno,
|
||||
"cannot open libxc handle");
|
||||
free(ctx->alloc_ptrs);
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
ctx->xsh = xs_daemon_open();
|
||||
if (!ctx->xsh) {
|
||||
XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, errno,
|
||||
"cannot connect to xenstore");
|
||||
xc_interface_close(ctx->xch);
|
||||
free(ctx->alloc_ptrs);
|
||||
return ERROR_FAIL;
|
||||
|
||||