qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bique Alexandre <alexandre.bique@citrix.com>
To: Juan Quintela <quintela@trasno.org>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH 5/5] ATAPI pass through v2: update the configure
Date: Thu, 2 Jul 2009 11:36:24 +0100	[thread overview]
Message-ID: <200907021136.24397.alexandre.bique@citrix.com> (raw)
In-Reply-To: <m3y6r86xfd.fsf@neno.mitica>

[-- Attachment #1: Type: text/plain, Size: 1160 bytes --]

On Wednesday 01 July 2009 20:00:22 Juan Quintela wrote:
> Bique Alexandre <alexandre.bique@citrix.com> 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 #2: configure-atapi --]
[-- Type: text/x-patch, Size: 1540 bytes --]

diff --git a/configure b/configure
index eb9d73a..009f210 100755
--- a/configure
+++ b/configure
@@ -191,6 +191,7 @@ nptl="yes"
 mixemu="no"
 bluez="yes"
 kvm="no"
+atapi_pt="no"
 kerneldir=""
 aix="no"
 blobs="yes"
@@ -501,6 +502,10 @@ for opt do
   ;;
   --disable-docs) build_docs="no"
   ;;
+  --enable-atapi-pt) atapi_pt="yes"
+  ;;
+  --disable-atapi-pt) atapi_pt="no"
+  ;;
   *) echo "ERROR: unknown option $opt"; show_help="yes"
   ;;
   esac
@@ -646,6 +651,8 @@ echo "  --disable-vde            disable support for vde network"
 echo "  --disable-pthread        disable pthread support"
 echo "  --disable-aio            disable AIO support"
 echo "  --enable-io-thread       enable IO thread"
+echo "  --enable-atapi-pt        enable atapi device pass through"
+echo "  --disable-atapi-pt       disable atapi device pass through"
 echo "  --disable-blobs          disable installing provided firmware blobs"
 echo "  --kerneldir=PATH         look for kernel includes in PATH"
 echo ""
@@ -1453,6 +1460,7 @@ echo "Install blobs     $blobs"
 echo -e "KVM support       $kvm"
 echo "fdt support       $fdt"
 echo "preadv support    $preadv"
+echo "atapi-pt support  $atapi_pt"
 
 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -1823,6 +1831,11 @@ bsd)
 ;;
 esac
 
+# ATAPI pass through
+if [ "$atapi_pt" = "yes" ] ; then
+  echo "#define CONFIG_ATAPI_PT 1" >>$config_h
+fi
+
 # Determine what linker flags to use to force archive inclusion
 check_linker_flags()
 {

  parent reply	other threads:[~2009-07-02 10:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01 18:32 [Qemu-devel] [PATCH 5/5] ATAPI pass through v2: update the configure Bique Alexandre
     [not found] ` <m3y6r86xfd.fsf@neno.mitica>
2009-07-02 10:36   ` Bique Alexandre [this message]
2009-07-05  8:16 ` Christoph Hellwig
2009-07-06 13:47   ` Bique Alexandre
2009-07-06 13:55     ` Christoph Hellwig
2009-07-06 14:33       ` Bique Alexandre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200907021136.24397.alexandre.bique@citrix.com \
    --to=alexandre.bique@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@trasno.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).