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

* Re: [Qemu-devel] Patch submission policy? (was Re: [PATCH] SAMBA multi-share support
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Jim C. Brown @ 2006-05-08 15:53 UTC (permalink / raw)
  To: Stealth Dave; +Cc: QEMU

Sorry for not replies to this earlier. It got lost in my spam folder somehow.

On Mon, May 01, 2006 at 12:29:15PM -0700, Stealth Dave wrote:
> 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. 

Patches are suppose to be sent to this list. If its a big change, you are
suppose to split it up into smaller patches and send those (so they can be
applied one by one).

Beyond that I don't know of any rules.

When patches are ignores, that usually means that it got lost in the mail.
Thats when you have to get a little bit pushy.

> 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.

Agreed. Feedback about rejected patches is crucial.

BTW, You can always come into the IRC channel and ask about it there.

> 
> Regards,
> - Dave

-- 
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.

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

* Re: [Qemu-devel] Patch submission policy? (was Re: [PATCH] SAMBA multi-share support
  2006-05-08 15:53 ` Jim C. Brown
@ 2006-05-08 18:17   ` Marius Groeger
  0 siblings, 0 replies; 3+ messages in thread
From: Marius Groeger @ 2006-05-08 18:17 UTC (permalink / raw)
  To: QEMU

On Mon, 8 May 2006, Jim C. Brown wrote:

> Patches are suppose to be sent to this list. If its a big change, you are
> suppose to split it up into smaller patches and send those (so they can be
> applied one by one).
>
> Beyond that I don't know of any rules.

I learned they should not contain any tabs; one level of indentation 
should be 4 spaces.

And of course it should help to have a patch agains head of trunc, not 
a past version.

> When patches are ignores, that usually means that it got lost in the mail.
> Thats when you have to get a little bit pushy.

Will need to check this for two of mine, too ... ;->

Cheers
Marius

-- 
Marius Groeger <mgroeger@sysgo.com>
SYSGO AG                      Embedded and Real-Time Software
Voice: +49 6136 9948 0                  FAX: +49 6136 9948 10
www.sysgo.com | www.elinos.com | www.osek.de | www.pikeos.com

^ 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).