From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJ6mt-0006m1-3y for qemu-devel@nongnu.org; Tue, 23 Jun 2009 10:15:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJ6mn-0006fZ-9x for qemu-devel@nongnu.org; Tue, 23 Jun 2009 10:15:50 -0400 Received: from [199.232.76.173] (port=50527 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJ6mm-0006f5-5H for qemu-devel@nongnu.org; Tue, 23 Jun 2009 10:15:44 -0400 Received: from mx2.redhat.com ([66.187.237.31]:42003) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJ6ml-0003in-KK for qemu-devel@nongnu.org; Tue, 23 Jun 2009 10:15:44 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5NEFhBQ030583 for ; Tue, 23 Jun 2009 10:15:43 -0400 From: quintela@redhat.com Date: Tue, 23 Jun 2009 16:14:04 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [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: qemu-devel@nongnu.org Cc: Juan Quintela 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; -- 1.6.2.2