From: Daniel De Graaf Subject: [PATCH] libxl: fix xenstore connection when run in domU Date: Thu, 26 Aug 2010 17:30:12 -0400 Message-ID: <4C76DCE4.1060206@tycho.nsa.gov> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060308020400080403020108" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------060308020400080403020108 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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. -- Daniel De Graaf National Security Agency --------------060308020400080403020108 Content-Type: text/plain; name="libxl-domu.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="libxl-domu.patch" diff -r 3c4c3d48a835 tools/libxl/libxl.c --- a/tools/libxl/libxl.c Thu Aug 26 11:16:56 2010 +0100 +++ b/tools/libxl/libxl.c Thu Aug 26 17:26:20 2010 -0400 @@ -54,6 +54,8 @@ } 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"); --------------060308020400080403020108 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------060308020400080403020108--