Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fae5k-00068D-AU for qemu-devel@nongnu.org; Mon, 01 May 2006 15:29:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fae5f-00064k-DC for qemu-devel@nongnu.org; Mon, 01 May 2006 15:29:56 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fae5f-00064b-A7 for qemu-devel@nongnu.org; Mon, 01 May 2006 15:29:51 -0400 Received: from [69.56.188.178] (helo=server01.killobyte.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fae9X-0003pM-Gc for qemu-devel@nongnu.org; Mon, 01 May 2006 15:33:51 -0400 Received: from [12.35.64.42] (helo=[10.210.16.114]) by server01.killobyte.com with esmtp (Exim 4.52) id 1Fae5e-00005J-2R for qemu-devel@nongnu.org; Mon, 01 May 2006 12:29:50 -0700 Mime-Version: 1.0 (Apple Message framework v623) Message-Id: <94daf69cfb5ca0d73230f9588487fe3f@triplecatproductions.com> Content-Type: multipart/mixed; boundary=Apple-Mail-5-700830573 From: Stealth Dave Date: Mon, 1 May 2006 12:29:15 -0700 Subject: [Qemu-devel] Patch submission policy? (was Re: [PATCH] SAMBA multi-share support Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU --Apple-Mail-5-700830573 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Is there a patch submission policy for QEMU? I see a lot of patches posted to this list. Some get accepted, some get rejected with comments, and others seem to be ignored. Back in February, I submitted a patch which expands the SAMBA capabilities of QEMU to allow multiple folders to be shared, and was backwards compatible with the old syntax. I resubmitted the patch via private email to the lead devs (Fabrice and Paul, the latter I presume can be considered a lead dev as he appears to have CVS commit access), but again got no feedback. I'm perfectly willing to accept that my patch isn't good enough for inclusion, or even that the new functionality is not wanted (although, I'd be dissappointed). But without any feedback whatsoever, I can't make improvements and, quite frankly, am feeling a little bit left out in the cold. So, I've decided to be the squeaky wheel. I've attached an updated patch the cleanly applies to current CVS. Please feel free to attach whatever license is necessary for distribution with QEMU. I welcome any feedback, and await an oil can or the junkyard. :) Regards, - Dave --Apple-Mail-5-700830573 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="smb-multishare-20060501.patch" Content-Disposition: attachment; filename=smb-multishare-20060501.patch diff -BurN qemu/qemu-doc.texi qemu-smb/qemu-doc.texi --- qemu/qemu-doc.texi Fri Mar 31 13:17:44 2006 +++ qemu-smb/qemu-doc.texi Thu Apr 13 20:09:52 2006 @@ -421,7 +421,7 @@ the Unix TFTP client). The host IP address on the guest is as usual 10.0.2.2. -@item -smb dir +@item -smb dir[:share,dir2:share2,dir3:share3...] When using the user mode network stack, activate a built-in SMB server so that Windows OSes can access to the host files in @file{dir} transparently. @@ -434,6 +434,14 @@ or @file{C:\WINNT\SYSTEM32\DRIVERS\ETC\LMHOSTS} (Windows NT/2000). Then @file{dir} can be accessed in @file{\\smbserver\qemu}. + +Additionally, you can share multiple folders by specifying the folder +name followed by a colon (:) and the desired share name, with each +folder / share name pair separated by commas (,). + +@example +qemu hd.img -smb /path/to/dir1:dir1,/path/to/dir2:dir2 +@end example Note that a SAMBA server must be installed on the host OS in @file{/usr/sbin/smbd}. QEMU was tested succesfully with smbd version diff -BurN qemu/vl.c qemu-smb/vl.c --- qemu/vl.c Wed Apr 12 14:09:08 2006 +++ qemu-smb/vl.c Thu Apr 13 20:09:52 2006 @@ -2451,6 +2451,9 @@ { char smb_conf[1024]; char smb_cmdline[1024]; + char smb_export[1024]; + char *smb_share; + char *smb_path; FILE *f; if (!slirp_inited) { @@ -2480,18 +2483,51 @@ "lock directory=%s\n" "log file=%s/log.smbd\n" "smb passwd file=%s/smbpasswd\n" - "security = share\n" - "[qemu]\n" - "path=%s\n" - "read only=no\n" - "guest ok=yes\n", - smb_dir, + "security = share\n", smb_dir, smb_dir, smb_dir, smb_dir, + smb_dir + ); + if ( strchr(exported_dir, ':') == NULL ) { + fprintf(f, + "[qemu]\n" + "path=%s\n" + "read only=no\n" + "guest ok=yes\n\n", exported_dir ); + } else { + + stpcpy( smb_export, exported_dir ); + /* Extract first path / share pair*/ + smb_share = strtok(smb_export, ":"); + smb_path = smb_share; + smb_share = strtok(NULL, ","); + fprintf(f, + "[%s]\n" + "path=%s\n" + "read only=no\n" + "guest ok=yes\n\n", + smb_share, + smb_path + ); + /* Extract remaining path / share pair*/ + while ( (smb_share=strtok(NULL, ":")) != NULL) + { + smb_path = smb_share; + smb_share=strtok(NULL, ","); + fprintf(f, + "[%s]\n" + "path=%s\n" + "read only=no\n" + "guest ok=yes\n\n", + smb_share, + smb_path + ); + } + } fclose(f); atexit(smb_exit); --Apple-Mail-5-700830573--