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] [PATCH/RFC] don't include <xen/sysctl.h> in libxl.h

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH/RFC] don't include <xen/sysctl.h> in libxl.h
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Fri, 7 Oct 2011 19:26:53 +0100
Cc: Guido Günther <agx@xxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 07 Oct 2011 11:28:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20111.14925.196745.735565@xxxxxxxxxxxxxxxxxxxxxxxx>
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: <20111005181413.GA32317@xxxxxxxxxxxxxxxxx> <20111007170528.GA21562@xxxxxxxxxxxxxxxxx> <20111.14925.196745.735565@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 2011-10-07 at 18:43 +0100, Ian Jackson wrote:
> Guido Günther writes ("[Xen-devel] [PATCH/RFC] don't include <xen/sysctl.h> 
> in l> Hi,
> > I'm unsure if libvirt qualifies as "node control tool":
> 
> Not in this context.
> 
> > In file included from /tmp/usr/include/libxl.h:137:0,
> >                  from libxl/libxl_conf.c:28:
> > /tmp/usr/include/xen/sysctl.h:31:2: error: #error "sysctl operations are 
> > intended for use by node control tools only"
> > In file included from /tmp/usr/include/xen/sysctl.h:35:0,
> >                  from /tmp/usr/include/libxl.h:137,
> >                  from libxl/libxl_conf.c:28:
> > 
> > If not it makes sense to remove the include from libxl.h and include it
> > in xl_cmdimpl.c directly. This allows libvirt to include libxl.h again
> > without defining __XEN_TOOLS__.
> 
> I think neither libxl.h nor xl_cmdimpl should drag in sysctl.h this
> way.
> 
> xl needs them because of this:
> 
>     if (info.phys_cap & XEN_SYSCTL_PHYSCAP_hvm)
>         printf(" hvm");
>     if (info.phys_cap & XEN_SYSCTL_PHYSCAP_hvm_directio)
>         printf(" hvm_directio");
> 
> Either libxl should proxy these kinds of flags,

I agree. I think the correct thing is for libxl to parse the raw data
into separate info.hvm, info.hvm_directio etc booleans, much like we do
for dominfo.

>  or the flags should be
> moved to a public header file, or all libxl callers should
> automatically get __XEN_TOOLS__.
> 
> Ian.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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

<Prev in Thread] Current Thread [Next in Thread>