From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C4MyF-0001qr-SH for qemu-devel@nongnu.org; Mon, 06 Sep 2004 13:07:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C4MyD-0001q8-VY for qemu-devel@nongnu.org; Mon, 06 Sep 2004 13:07:59 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C4MyD-0001pk-RY for qemu-devel@nongnu.org; Mon, 06 Sep 2004 13:07:57 -0400 Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C4Msd-0000WR-F3 for qemu-devel@nongnu.org; Mon, 06 Sep 2004 13:02:11 -0400 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1C4Msc-0002Ki-00 for ; Mon, 06 Sep 2004 19:02:10 +0200 Received: from amarseille-206-1-10-146.w81-49.abo.wanadoo.fr ([81.49.130.146]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 06 Sep 2004 19:02:10 +0200 Received: from daimon55 by amarseille-206-1-10-146.w81-49.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 06 Sep 2004 19:02:10 +0200 From: Ronald Date: Mon, 06 Sep 2004 19:02:07 +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 02:30:50 +0200, Ronald a écrit : > Just a small fix to make it build for windows. > Perhaps the following could be more usefull. Not sure if this is correct and even work. --- vl.c.old 2004-09-06 18:55:04.524395364 +0200 +++ vl.c 2004-09-06 18:51:54.751498634 +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,7 +1493,11 @@ } /* XXX: better tmp dir construction */ - snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d", getpid()); + #ifdef _WIN32 + snprintf(smb_cmdline, sizeof(smb_cmdline), "net share qemu=%s", exported_dir); + atexit(snprintf(smb_cmdline, sizeof(smb_cmdline), "net share qemu=%s /DELETE", exported_dir)); + #else + snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d", getpid()); if (mkdir(smb_dir, 0700) < 0) { fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir); exit(1); @@ -1526,6 +1530,7 @@ atexit(smb_exit); snprintf(smb_cmdline, sizeof(smb_cmdline), "/usr/sbin/smbd -s %s", smb_conf); +#endif slirp_add_exec(0, smb_cmdline, 4, 139); }