From: Ian Campbell Subject: Re: Re: [PATCH] libxl: fix xenstore connection when run in domU Date: Tue, 31 Aug 2010 10:15:19 +0100 Message-ID: <1283246119.12544.9287.camel@zakaz.uk.xensource.com> References: <433DDF91DFB08148BAD3FDB6FDDA314C9F35F3BB4F@LONPMAILBOX01.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <433DDF91DFB08148BAD3FDB6FDDA314C9F35F3BB4F@LONPMAILBOX01.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Jun Zhu (Intern)" Cc: "dgdegra@tycho.nsa.gov" , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Tue, 2010-08-31 at 10:05 +0100, Jun Zhu (Intern) wrote: > Hi > > There are other places that use the xs_daemon_open in libxl. Is it necessory to change them as follows? > 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"); I think we'd be better off introducing "libxl__xs_open" which does the right thing and make the users to all use it. Is there any harm in always preferring xs_domain_open, even if the xenstore daemon happens to be co-located in the same domain? Ian.