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 <dgdegra@tycho.nsa.gov>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
}
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");