* [Qemu-devel] [PATCH 5/5] ATAPI pass through v2: update the configure
@ 2009-07-01 18:32 Bique Alexandre
[not found] ` <m3y6r86xfd.fsf@neno.mitica>
2009-07-05 8:16 ` [Qemu-devel] " Christoph Hellwig
0 siblings, 2 replies; 6+ messages in thread
From: Bique Alexandre @ 2009-07-01 18:32 UTC (permalink / raw)
To: qemu-devel@nongnu.org
[-- Attachment #1: Type: text/plain, Size: 104 bytes --]
This patch update the configure by adding --enable-atapi-pt and
--disable-atapi-pt.
--
Alexandre Bique
[-- Attachment #2: configure-atapi --]
[-- Type: text/x-patch, Size: 2263 bytes --]
diff --git a/configure b/configure
index eb9d73a..9a28082 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"
@@ -323,6 +324,19 @@ AIX)
aix="yes"
make="gmake"
;;
+Linux)
+atapi_pt="yes"
+audio_drv_list="oss"
+audio_possible_drivers="oss alsa sdl esd pa"
+linux="yes"
+linux_user="yes"
+usb="linux"
+kvm="yes"
+if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
+ kqemu="yes"
+ audio_possible_drivers="$audio_possible_drivers fmod"
+fi
+;;
*)
audio_drv_list="oss"
audio_possible_drivers="oss alsa sdl esd pa"
@@ -501,6 +515,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 +664,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 +1473,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 +1844,22 @@ bsd)
;;
esac
+# 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
+fi
+
# Determine what linker flags to use to force archive inclusion
check_linker_flags()
{
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: [PATCH 5/5] ATAPI pass through v2: update the configure
[not found] ` <m3y6r86xfd.fsf@neno.mitica>
@ 2009-07-02 10:36 ` Bique Alexandre
0 siblings, 0 replies; 6+ messages in thread
From: Bique Alexandre @ 2009-07-02 10:36 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel@nongnu.org
[-- 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()
{
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 5/5] ATAPI pass through v2: update the configure
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-05 8:16 ` Christoph Hellwig
2009-07-06 13:47 ` Bique Alexandre
1 sibling, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2009-07-05 8:16 UTC (permalink / raw)
To: Bique Alexandre; +Cc: qemu-devel@nongnu.org
On Wed, Jul 01, 2009 at 07:32:04PM +0100, Bique Alexandre wrote:
> This patch update the configure by adding --enable-atapi-pt and
> --disable-atapi-pt.
Do we need an option for this? I'd say we should make it uncoditional
when built on Linux like the SCSI passthrough code.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 5/5] ATAPI pass through v2: update the configure
2009-07-05 8:16 ` [Qemu-devel] " Christoph Hellwig
@ 2009-07-06 13:47 ` Bique Alexandre
2009-07-06 13:55 ` Christoph Hellwig
0 siblings, 1 reply; 6+ messages in thread
From: Bique Alexandre @ 2009-07-06 13:47 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: qemu-devel@nongnu.org
On Sunday 05 July 2009 09:16:37 Christoph Hellwig wrote:
> On Wed, Jul 01, 2009 at 07:32:04PM +0100, Bique Alexandre wrote:
> > This patch update the configure by adding --enable-atapi-pt and
> > --disable-atapi-pt.
>
> Do we need an option for this? I'd say we should make it uncoditional
> when built on Linux like the SCSI passthrough code.
Ok, so I just do:
If Linux then
enable
else
disable
fi
?
--
Alexandre Bique
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 5/5] ATAPI pass through v2: update the configure
2009-07-06 13:47 ` Bique Alexandre
@ 2009-07-06 13:55 ` Christoph Hellwig
2009-07-06 14:33 ` Bique Alexandre
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2009-07-06 13:55 UTC (permalink / raw)
To: Bique Alexandre; +Cc: Christoph Hellwig, qemu-devel@nongnu.org
On Mon, Jul 06, 2009 at 02:47:40PM +0100, Bique Alexandre wrote:
> On Sunday 05 July 2009 09:16:37 Christoph Hellwig wrote:
> > On Wed, Jul 01, 2009 at 07:32:04PM +0100, Bique Alexandre wrote:
> > > This patch update the configure by adding --enable-atapi-pt and
> > > --disable-atapi-pt.
> >
> > Do we need an option for this? I'd say we should make it uncoditional
> > when built on Linux like the SCSI passthrough code.
>
> Ok, so I just do:
>
> If Linux then
> enable
> else
> disable
> fi
Yes. Take a look at hw/virtio-blk.c and hw/scsi-generic.c for how we
guard the other pass-through users.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 5/5] ATAPI pass through v2: update the configure
2009-07-06 13:55 ` Christoph Hellwig
@ 2009-07-06 14:33 ` Bique Alexandre
0 siblings, 0 replies; 6+ messages in thread
From: Bique Alexandre @ 2009-07-06 14:33 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: qemu-devel@nongnu.org
[-- Attachment #1: Type: text/plain, Size: 997 bytes --]
On Monday 06 July 2009 14:55:00 Christoph Hellwig wrote:
> On Mon, Jul 06, 2009 at 02:47:40PM +0100, Bique Alexandre wrote:
> > On Sunday 05 July 2009 09:16:37 Christoph Hellwig wrote:
> > > On Wed, Jul 01, 2009 at 07:32:04PM +0100, Bique Alexandre wrote:
> > > > This patch update the configure by adding --enable-atapi-pt and
> > > > --disable-atapi-pt.
> > >
> > > Do we need an option for this? I'd say we should make it uncoditional
> > > when built on Linux like the SCSI passthrough code.
> >
> > Ok, so I just do:
> >
> > If Linux then
> > enable
> > else
> > disable
> > fi
>
> Yes. Take a look at hw/virtio-blk.c and hw/scsi-generic.c for how we
> guard the other pass-through users.
I looked at these files and instead of doing
#ifdef __linux__
... code ...
#endif
I propose to do
#ifdef __linux__
# define CONFIG_ATAPI_PT
#endif
in config.h and still do
#ifdef CONFIG_ATAPI_PT
... code ...
#endif
in other source file.
Here is an updated patch.
Thanks.
--
Alexandre Bique
[-- Attachment #2: configure-atapi --]
[-- Type: text/x-patch, Size: 347 bytes --]
diff --git a/configure b/configure
index eb9d73a..009f210 100755
--- a/configure
+++ b/configure
@@ -1823,6 +1823,12 @@ bsd)
;;
esac
+# ATAPI pass through
+cat <<EOF >>$config_h
+#ifdef __linux__
+# define CONFIG_ATAPI_PT 1
+#endif /* __linux__ */
+EOF
# Determine what linker flags to use to force archive inclusion
check_linker_flags()
{
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-07-06 14:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Qemu-devel] " Bique Alexandre
2009-07-05 8:16 ` [Qemu-devel] " Christoph Hellwig
2009-07-06 13:47 ` Bique Alexandre
2009-07-06 13:55 ` Christoph Hellwig
2009-07-06 14:33 ` Bique Alexandre
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).