diff mbox

[5/5] configure: CONFIG_NO_XEN is duplicated

Message ID 1364913860-25159-6-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini April 2, 2013, 2:44 p.m. UTC
We already define it in Makefile.target.  But we need to avoid a
curious double negation in order to eliminate it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 3 ---
 hw/xen.h  | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

Comments

Stefano Stabellini April 2, 2013, 4:54 p.m. UTC | #1
On Tue, 2 Apr 2013, Paolo Bonzini wrote:
> We already define it in Makefile.target.  But we need to avoid a
> curious double negation in order to eliminate it.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Tested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>


>  configure | 3 ---
>  hw/xen.h  | 2 +-
>  2 files changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/configure b/configure
> index da0e8aa..98716ae 100755
> --- a/configure
> +++ b/configure
> @@ -4161,12 +4161,9 @@ case "$target_arch2" in
>        if test "$xen_pci_passthrough" = yes; then
>          echo "CONFIG_XEN_PCI_PASSTHROUGH=y" >> "$config_target_mak"
>        fi
> -    else
> -      echo "CONFIG_NO_XEN=y" >> $config_target_mak
>      fi
>      ;;
>    *)
> -    echo "CONFIG_NO_XEN=y" >> $config_target_mak
>  esac
>  case "$target_arch2" in
>    arm|i386|x86_64|ppcemb|ppc|ppc64|s390x)
> diff --git a/hw/xen.h b/hw/xen.h
> index 6235f91..7451c5a 100644
> --- a/hw/xen.h
> +++ b/hw/xen.h
> @@ -25,7 +25,7 @@ extern bool xen_allowed;
>  
>  static inline bool xen_enabled(void)
>  {
> -#if defined(CONFIG_XEN_BACKEND) && !defined(CONFIG_NO_XEN)
> +#if defined(CONFIG_XEN_BACKEND) && defined(CONFIG_XEN)
>      return xen_allowed;
>  #else
>      return 0;
> -- 
> 1.8.1.4
> 
>
Peter Maydell April 2, 2013, 5:24 p.m. UTC | #2
On 2 April 2013 15:44, Paolo Bonzini <pbonzini@redhat.com> wrote:
> We already define it in Makefile.target.  But we need to avoid a
> curious double negation in order to eliminate it.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

CONFIG_NO_FOO should only be used in makefiles; I
checked, and the CONFIG_NO_XEN you eliminate here is
the only one that had strayed into source code.

(The real trick of course would be to be able to define
CONFIG_TEA and CONFIG_NO_TEA at the same time.)

-- PMM
diff mbox

Patch

diff --git a/configure b/configure
index da0e8aa..98716ae 100755
--- a/configure
+++ b/configure
@@ -4161,12 +4161,9 @@  case "$target_arch2" in
       if test "$xen_pci_passthrough" = yes; then
         echo "CONFIG_XEN_PCI_PASSTHROUGH=y" >> "$config_target_mak"
       fi
-    else
-      echo "CONFIG_NO_XEN=y" >> $config_target_mak
     fi
     ;;
   *)
-    echo "CONFIG_NO_XEN=y" >> $config_target_mak
 esac
 case "$target_arch2" in
   arm|i386|x86_64|ppcemb|ppc|ppc64|s390x)
diff --git a/hw/xen.h b/hw/xen.h
index 6235f91..7451c5a 100644
--- a/hw/xen.h
+++ b/hw/xen.h
@@ -25,7 +25,7 @@  extern bool xen_allowed;
 
 static inline bool xen_enabled(void)
 {
-#if defined(CONFIG_XEN_BACKEND) && !defined(CONFIG_NO_XEN)
+#if defined(CONFIG_XEN_BACKEND) && defined(CONFIG_XEN)
     return xen_allowed;
 #else
     return 0;