diff mbox

[2/2] xenstore: Use <xenstore.h>

Message ID 1339759030-32653-3-git-send-email-anthony.perard@citrix.com
State New
Headers show

Commit Message

Anthony PERARD June 15, 2012, 11:17 a.m. UTC
In the next release of Xen (4.2), xs.h became deprecated.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 configure       |    2 +-
 hw/xen_common.h |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

Comments

Juan Quintela June 15, 2012, 11:53 a.m. UTC | #1
Anthony PERARD <anthony.perard@citrix.com> wrote:
> In the next release of Xen (4.2), xs.h became deprecated.
>
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
>  configure       |    2 +-
>  hw/xen_common.h |    6 +++++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index c2366ee..e7f66c9 100755
> --- a/configure
> +++ b/configure
> @@ -1382,7 +1382,7 @@ EOF
>    elif (
>        cat > $TMPC <<EOF
>  #include <xenctrl.h>
> -#include <xs.h>
> +#include <xenstore.h>
>  #include <stdint.h>
>  #include <xen/hvm/hvm_info_table.h>
>  #if !defined(HVM_MAX_VCPUS)
> diff --git a/hw/xen_common.h b/hw/xen_common.h
> index fe7f227..cc99204 100644
> --- a/hw/xen_common.h
> +++ b/hw/xen_common.h
> @@ -7,7 +7,11 @@
>  #include <inttypes.h>
>  
>  #include <xenctrl.h>
> -#include <xs.h>
> +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 420
> +#  include <xs.h>
> +#else
> +#  include <xenstore.h>
> +#endif
>  #include <xen/io/xenbus.h>
>  
>  #include "hw.h"

Shouldn't we need the ifdef also in configure?  On my system xenstore.h
still don't exist.

(master *)$ rpm -qa xen-devel
xen-devel-4.1.2-17.fc17.x86_64
(master *)$ ls /usr/include/xs.h 
/usr/include/xs.h
(master *)$ ls /usr/include/xenstore.h
ls: cannot access /usr/include/xenstore.h: No such file or directory
(master *)$ 


Later, Juan.
Stefano Stabellini June 15, 2012, 12:24 p.m. UTC | #2
On Fri, 15 Jun 2012, Juan Quintela wrote:
> Anthony PERARD <anthony.perard@citrix.com> wrote:
> > In the next release of Xen (4.2), xs.h became deprecated.
> >
> > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> > ---
> >  configure       |    2 +-
> >  hw/xen_common.h |    6 +++++-
> >  2 files changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/configure b/configure
> > index c2366ee..e7f66c9 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1382,7 +1382,7 @@ EOF
> >    elif (
> >        cat > $TMPC <<EOF
> >  #include <xenctrl.h>
> > -#include <xs.h>
> > +#include <xenstore.h>
> >  #include <stdint.h>
> >  #include <xen/hvm/hvm_info_table.h>
> >  #if !defined(HVM_MAX_VCPUS)
> > diff --git a/hw/xen_common.h b/hw/xen_common.h
> > index fe7f227..cc99204 100644
> > --- a/hw/xen_common.h
> > +++ b/hw/xen_common.h
> > @@ -7,7 +7,11 @@
> >  #include <inttypes.h>
> >  
> >  #include <xenctrl.h>
> > -#include <xs.h>
> > +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 420
> > +#  include <xs.h>
> > +#else
> > +#  include <xenstore.h>
> > +#endif
> >  #include <xen/io/xenbus.h>
> >  
> >  #include "hw.h"
> 
> Shouldn't we need the ifdef also in configure?  On my system xenstore.h
> still don't exist.
> 
> (master *)$ rpm -qa xen-devel
> xen-devel-4.1.2-17.fc17.x86_64
> (master *)$ ls /usr/include/xs.h 
> /usr/include/xs.h
> (master *)$ ls /usr/include/xenstore.h
> ls: cannot access /usr/include/xenstore.h: No such file or directory
> (master *)$ 

configure is already testing for a number of specific xen versions,
this patch is only changing the xen-unstable test, but all the other
tests for older xen versions still use xs.h.
Anthony PERARD June 15, 2012, 12:24 p.m. UTC | #3
On 15/06/12 12:53, Juan Quintela wrote:
> Anthony PERARD<anthony.perard@citrix.com>  wrote:
>> In the next release of Xen (4.2), xs.h became deprecated.
>>
>> Signed-off-by: Anthony PERARD<anthony.perard@citrix.com>
>> ---
>>   configure       |    2 +-
>>   hw/xen_common.h |    6 +++++-
>>   2 files changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure b/configure
>> index c2366ee..e7f66c9 100755
>> --- a/configure
>> +++ b/configure
>> @@ -1382,7 +1382,7 @@ EOF
>>     elif (
>>         cat>  $TMPC<<EOF
>>   #include<xenctrl.h>
>> -#include<xs.h>
>> +#include<xenstore.h>
>>   #include<stdint.h>
>>   #include<xen/hvm/hvm_info_table.h>
>>   #if !defined(HVM_MAX_VCPUS)
>> diff --git a/hw/xen_common.h b/hw/xen_common.h
>> index fe7f227..cc99204 100644
>> --- a/hw/xen_common.h
>> +++ b/hw/xen_common.h
>> @@ -7,7 +7,11 @@
>>   #include<inttypes.h>
>>
>>   #include<xenctrl.h>
>> -#include<xs.h>
>> +#if CONFIG_XEN_CTRL_INTERFACE_VERSION<  420
>> +#  include<xs.h>
>> +#else
>> +#  include<xenstore.h>
>> +#endif
>>   #include<xen/io/xenbus.h>
>>
>>   #include "hw.h"
>
> Shouldn't we need the ifdef also in configure?  On my system xenstore.h
> still don't exist.

No, configure does not need it. In the configure, I just change the 
header in the test for the next version of Xen. Also the define is 
defined by configure.

Regards,
diff mbox

Patch

diff --git a/configure b/configure
index c2366ee..e7f66c9 100755
--- a/configure
+++ b/configure
@@ -1382,7 +1382,7 @@  EOF
   elif (
       cat > $TMPC <<EOF
 #include <xenctrl.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <stdint.h>
 #include <xen/hvm/hvm_info_table.h>
 #if !defined(HVM_MAX_VCPUS)
diff --git a/hw/xen_common.h b/hw/xen_common.h
index fe7f227..cc99204 100644
--- a/hw/xen_common.h
+++ b/hw/xen_common.h
@@ -7,7 +7,11 @@ 
 #include <inttypes.h>
 
 #include <xenctrl.h>
-#include <xs.h>
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 420
+#  include <xs.h>
+#else
+#  include <xenstore.h>
+#endif
 #include <xen/io/xenbus.h>
 
 #include "hw.h"