qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 5/5] ATAPI pass through v2: update the configure


From: Bique Alexandre
Subject: [Qemu-devel] Re: [PATCH 5/5] ATAPI pass through v2: update the configure
Date: Thu, 2 Jul 2009 11:36:24 +0100
User-agent: KMail/1.11.4 (Linux/2.6.30-ARCH; KDE/4.2.4; x86_64; ; )

On Wednesday 01 July 2009 20:00:22 Juan Quintela wrote:
> Bique Alexandre <address@hidden> wrote:
> > This patch update the configure by adding --enable-atapi-pt and
> > --disable-atapi-pt.
>
> +# ATAPI pass through
> +if [ "$atapi_pt" = "yes" ] ; then
> +  if [ "$targetos" != "Linux" ] ; then
> +    echo "error: you need a Linux target OS to use ATAPI pass through" >&2
> +    exit 1
> +  fi
> +  cat <<EOF >>$config_h
> +#define CONFIG_ATAPI_PT 1
> +#ifndef __linux__
> +#error "You can't enable ATAPI pass through if you're not using linux."
> +#endif /* __linux__ */
> +EOF
> +else
> +  echo "#define CONFIG_ATAPI_PT 0" >>$config_h
>
> Normally we never define the variable when it is disabled, that way you
> can do
>
> #ifdef CONFIG_ATAPI_PT

Alright. I have been confused because setting its value to 1 means that you 
allow to get/test it. So you can do #if CONFIG_ATAPI_PT, and this becomes 
wrong if CONFIG_ATAPI_PT is not defined. That's why I defined CONFIG_ATAPI_PT 
to 0 if disabled.

I join a new version of this patch. I also removed useless checks against 
linux because I'm no more using bsg.

Thanks Juan.

-- 
Alexandre Bique

Attachment: configure-atapi
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]