qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 06/15] Add --disable-smb to remove smb directories s


From: quintela
Subject: [Qemu-devel] [PATCH 06/15] Add --disable-smb to remove smb directories support
Date: Tue, 23 Jun 2009 16:14:04 +0200

From: Juan Quintela <address@hidden>


Signed-off-by: Juan Quintela <address@hidden>
---
 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





reply via email to

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