From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJ9kq-0005g1-RJ for qemu-devel@nongnu.org; Tue, 23 Jun 2009 13:25:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJ9km-0005dQ-Fa for qemu-devel@nongnu.org; Tue, 23 Jun 2009 13:25:56 -0400 Received: from [199.232.76.173] (port=39601 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJ9km-0005d4-1p for qemu-devel@nongnu.org; Tue, 23 Jun 2009 13:25:52 -0400 Received: from lizzard.sbs.de ([194.138.37.39]:23654) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MJ9kl-0006SY-6z for qemu-devel@nongnu.org; Tue, 23 Jun 2009 13:25:51 -0400 Message-ID: <4A411017.4030008@siemens.com> Date: Tue, 23 Jun 2009 19:25:43 +0200 From: Jan Kiszka MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 06/15] Add --disable-smb to remove smb directories support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: quintela@redhat.com Cc: qemu-devel@nongnu.org quintela@redhat.com wrote: > From: Juan Quintela > > > Signed-off-by: Juan Quintela > --- > configure | 9 +++++++++ > net.c | 2 ++ > qemu-options.hx | 2 +- > vl.c | 2 +- > 4 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/configure b/configure > index f859065..93823cb 100755 > --- a/configure > +++ b/configure > @@ -192,6 +192,7 @@ mixemu="no" > bluez="yes" > kvm="no" > usb="yes" > +smb="yes" > kerneldir="" > aix="no" > blobs="yes" > @@ -439,6 +440,8 @@ for opt do > ;; > --disable-usb) usb="no" > ;; > + --disable-smb) smb="no" > + ;; > --disable-kvm) kvm="no" > ;; > --enable-profiler) profiler="yes" > @@ -631,6 +634,7 @@ echo " --disable-curses disable curses output" > echo " --disable-curl disable curl connectivity" > echo " --disable-bluez disable bluez stack connectivity" > echo " --disable-usb disable usb stack connectivity" > +echo " --disable-smb disable smb directories support" > echo " --disable-kvm disable KVM acceleration support" > echo " --disable-nptl disable usermode NPTL support" > echo " --enable-system enable all system emulation targets" > @@ -663,6 +667,7 @@ if test "$mingw32" = "yes" ; then > oss="no" > linux_user="no" > bsd_user="no" > + smb="no" > OS_CFLAGS="$OS_CFLAGS -DWIN32_LEAN_AND_MEAN -DWINVER=0x501" > fi > > @@ -1454,6 +1459,7 @@ echo "fdt support $fdt" > echo "preadv support $preadv" > echo "bluetooth support $bluez" > echo "usb support $usb" > +echo "smb directories $smb" > > if test $sdl_too_old = "yes"; then > echo "-> Your SDL version is too old - please upgrade to have SDL support" > @@ -1776,6 +1782,9 @@ fi > if test "$xen" = "yes" ; then > echo "XEN_LIBS=-lxenstore -lxenctrl -lxenguest" >> $config_mak > fi > +if test "$smb" = "yes" ; then > + echo "#define CONFIG_SMB 1" >> $config_h > +fi > if test "$aio" = "yes" ; then > echo "#define CONFIG_AIO 1" >> $config_h > echo "CONFIG_AIO=yes" >> $config_mak > diff --git a/net.c b/net.c > index 55f70f2..8142f5e 100644 > --- a/net.c > +++ b/net.c > @@ -996,6 +996,7 @@ static void slirp_smb(const char *exported_dir) > slirp_add_exec(0, smb_cmdline, 4, 139); > } > > +#ifdef CONFIG_SMB > /* automatic user mode samba server configuration */ > void net_slirp_smb(const char *exported_dir) > { > @@ -1008,6 +1009,7 @@ void net_slirp_smb(const char *exported_dir) > slirp_smb(exported_dir); > } > } > +#endif > > #endif /* !defined(_WIN32) */ > > diff --git a/qemu-options.hx b/qemu-options.hx > index c765869..0a0f327 100644 > --- a/qemu-options.hx > +++ b/qemu-options.hx > @@ -937,7 +937,7 @@ qemu -hda linux.img -boot n -tftp /path/to/tftp/files -bootp /pxelinux.0 > @end example > ETEXI > > -#ifndef _WIN32 > +#ifdef CONFIG_SMB > DEF("smb", HAS_ARG, QEMU_OPTION_smb, \ > "-smb dir allow SMB access to files in 'dir' [-net user]\n") > #endif > diff --git a/vl.c b/vl.c > index e1ead85..830ffa3 100644 > --- a/vl.c > +++ b/vl.c > @@ -5314,7 +5314,7 @@ int main(int argc, char **argv, char **envp) > case QEMU_OPTION_bootp: > bootp_filename = optarg; > break; > -#ifndef _WIN32 > +#ifdef CONFIG_SMB > case QEMU_OPTION_smb: > net_slirp_smb(optarg); > break; This patch collides with pending rework of the slirp stack. I hope to role them out the next days (some tests and one feature is missing ATM). I would appreciate if we can synchronize before merging -- if we really want it... I think the patch does not reflect the dependency of CONFIG_SMB on CONFIG_SLIRP. Moreover, I bet it's not covering all bits. Given the small amount of code it avoids, I would say: keep this feature under the hood of CONFIG_SLIRP. It's not worth the complication (it will become much more complicated with my fully configurable slirp stack, see earlier postings). Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux