qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Patch submission policy? (was Re: [PATCH] SAMBA multi-share support
@ 2006-05-01 19:29 Stealth Dave
  2006-05-08 15:53 ` Jim C. Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Stealth Dave @ 2006-05-01 19:29 UTC (permalink / raw)
  To: QEMU

[-- Attachment #1: Type: text/plain, Size: 1134 bytes --]

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

[-- Attachment #2: smb-multishare-20060501.patch --]
[-- Type: application/octet-stream, Size: 2910 bytes --]

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);
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-05-08 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-01 19:29 [Qemu-devel] Patch submission policy? (was Re: [PATCH] SAMBA multi-share support Stealth Dave
2006-05-08 15:53 ` Jim C. Brown
2006-05-08 18:17   ` Marius Groeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).