From: Daniel De Graaf Date: Mon, 30 Aug 2010 12:58:07 +0000 (+0100) Subject: libxl: fix xenstore connection when run in domU X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11565 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8753bc456e7791b8f4c6c20f46488d11870c5f50;p=xen.git libxl: fix xenstore connection when run in domU When used in a domain other than the one running xenstore, libxl_ctx_init will fail to connect even when xenstore is actually available. Add a call to xs_domain_open to handle this case. Signed-off-by: Daniel De Graaf Signed-off-by: Stefano Stabellini committer: Stefano Stabellini --- diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 099d82e7e9..4976415333 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -54,6 +54,8 @@ int libxl_ctx_init(libxl_ctx *ctx, int version, xentoollog_logger *lg) } ctx->xsh = xs_daemon_open(); + if (!ctx->xsh) + ctx->xsh = xs_domain_open(); if (!ctx->xsh) { XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, errno, "cannot connect to xenstore");