From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C47Ug-0006Ek-Kx for qemu-devel@nongnu.org; Sun, 05 Sep 2004 20:36:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C47Ug-0006ER-1T for qemu-devel@nongnu.org; Sun, 05 Sep 2004 20:36:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C47Uf-0006EO-Tf for qemu-devel@nongnu.org; Sun, 05 Sep 2004 20:36:25 -0400 Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C47PO-0006z8-JR for qemu-devel@nongnu.org; Sun, 05 Sep 2004 20:30:58 -0400 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1C47PM-0002TJ-00 for ; Mon, 06 Sep 2004 02:30:56 +0200 Received: from amarseille-206-1-19-36.w81-50.abo.wanadoo.fr ([81.50.177.36]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 06 Sep 2004 02:30:56 +0200 Received: from daimon55 by amarseille-206-1-19-36.w81-50.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 06 Sep 2004 02:30:56 +0200 From: Ronald Date: Mon, 06 Sep 2004 02:30:50 +0200 Message-ID: References: <413BA018.60601@bellard.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: news Subject: [Qemu-devel] Re: SAMBA support in QEMU Reply-To: daimon55@free.fr, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Le Mon, 06 Sep 2004 01:24:08 +0200, Fabrice Bellard a écrit : > Hi, > > I just commited a simple solution to enable direct access to host files > from Windows guests with user mode networking and with almost no set up. > It is currently very experimental but it works, at least for Windows 98 > with the Samba server from Red Hat 9. Any suggestion is welcome. > Just a small fix to make it build for windows. --- vl.c.old 2004-09-06 02:25:03.958702256 +0200 +++ vl.c 2004-09-06 02:22:41.086234244 +0200 @@ -29,6 +29,7 @@ #include #include #include +#include #ifndef _WIN32 #include @@ -38,7 +39,6 @@ #include #include #include -#include #ifdef _BSD #include #ifndef __APPLE__ @@ -1493,10 +1493,17 @@ /* XXX: better tmp dir construction */ snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d", getpid()); + #ifdef _WIN32 + if (mkdir(smb_dir) < 0) { + fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir); + exit(1); + } + #else if (mkdir(smb_dir, 0700) < 0) { fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir); exit(1); } + #endif snprintf(smb_conf, sizeof(smb_conf), "%s/%s", smb_dir, "smb.conf"); f = fopen(smb_conf, "w");