From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GxvsC-0005Ic-Pw for qemu-devel@nongnu.org; Fri, 22 Dec 2006 20:40:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GxvsC-0005IH-87 for qemu-devel@nongnu.org; Fri, 22 Dec 2006 20:40:28 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GxvsC-0005I7-2V for qemu-devel@nongnu.org; Fri, 22 Dec 2006 20:40:28 -0500 Received: from [70.168.83.79] (helo=centrmmtao05.cox.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GxvsB-0005aA-Kj for qemu-devel@nongnu.org; Fri, 22 Dec 2006 20:40:27 -0500 Message-ID: <18787935.1166838027152.JavaMail.root@eastrmwml07.mgt.cox.net> Date: Fri, 22 Dec 2006 20:40:27 -0500 From: Ben Taylor Subject: Re: [Qemu-devel] patch for supporting SMB on Solaris host MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_55151_17875386.1166838027109" Reply-To: sol10x86@cox.net, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook , qemu-devel@nongnu.org ------=_Part_55151_17875386.1166838027109 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit ---- Paul Brook wrote: > On Friday 22 December 2006 21:29, Paul Brook wrote: > > On Friday 22 December 2006 20:07, Ben Taylor wrote: > > > Seeing as there is some working going on in the Solaris QEMU port again, > > > here's a real short patch to support Samba working on a Solaris Host. > > > +#ifdef __sun__ > > > + snprintf(smb_cmdline, sizeof(smb_cmdline), "/bin/env LC_ALL=C > > > /usr/sfw/sbin/smbd -s %s", > > > + smb_conf); > > > +#else > > > > Why does this have anything to do with solaris? > > Sorry, I was unclear. The /usr/swf bif is obviously a Solaris hack, and I > think this is a bad way of implementing this. > I don't see why the /bin/env LC_ALL bits have anything to do with Solaris. Hopefully, you find this patch to be more reasonable. Ben ------=_Part_55151_17875386.1166838027109 Content-Type: text/x-patch; name=smb.patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=smb.patch diff -ruN qemu-ORIG/configure qemu-smb/configure --- qemu-ORIG/configure 2006-12-18 22:31:34.000000000 -0500 +++ qemu-smb/configure 2006-12-22 19:15:05.710251000 -0500 @@ -30,6 +30,7 @@ install="install" strip="strip" cpu=`uname -m` +smbd=/usr/sbin/smbd target_list="" case "$cpu" in i386|i486|i586|i686|i86pc|BePC) @@ -150,6 +151,7 @@ make="gmake" install="ginstall" solarisrev=`uname -r | cut -f2 -d.` + smbd=/usr/sfw/sbin/smbd fi # find source path @@ -579,6 +581,7 @@ echo "Documentation $build_docs" [ ! -z "$uname_release" ] && \ echo "uname -r $uname_release" +echo "smbd $smbd" if test $sdl_too_old = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" @@ -613,6 +616,7 @@ echo "CFLAGS=$CFLAGS" >> $config_mak echo "LDFLAGS=$LDFLAGS" >> $config_mak echo "EXESUF=$EXESUF" >> $config_mak +echo "#define SMBD_BINARY \"$smbd\"" >> $config_h if test "$cpu" = "i386" ; then echo "ARCH=i386" >> $config_mak echo "#define HOST_I386 1" >> $config_h diff -ruN qemu-ORIG/vl.c qemu-smb/vl.c --- qemu-ORIG/vl.c 2006-12-22 12:29:05.000000000 -0500 +++ qemu-smb/vl.c 2006-12-22 19:11:08.010585000 -0500 @@ -3069,8 +3069,8 @@ fclose(f); atexit(smb_exit); - snprintf(smb_cmdline, sizeof(smb_cmdline), "/usr/sbin/smbd -s %s", - smb_conf); + snprintf(smb_cmdline, sizeof(smb_cmdline), "% -s %s", + SMBD_BINARY, smb_conf); slirp_add_exec(0, smb_cmdline, 4, 139); } ------=_Part_55151_17875386.1166838027109--