WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH] libxl: fix xenstore connection when run in d

To: "Jun Zhu (Intern)" <Jun.Zhu@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] libxl: fix xenstore connection when run in domU
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Tue, 31 Aug 2010 10:15:19 +0100
Cc: "dgdegra@xxxxxxxxxxxxx" <dgdegra@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 31 Aug 2010 02:16:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <433DDF91DFB08148BAD3FDB6FDDA314C9F35F3BB4F@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <433DDF91DFB08148BAD3FDB6FDDA314C9F35F3BB4F@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel