diff -BurN qemu/CVS/Entries qemu-smb/CVS/Entries
--- qemu/CVS/Entries	Mon Feb 13 12:09:02 2006
+++ qemu-smb/CVS/Entries	Mon Feb 13 11:34:09 2006
@@ -63,6 +63,7 @@
 /ppc-dis.c/1.7/Sat Jul 23 22:39:53 2005//
 /ppc.ld/1.2/Sun Jun  5 15:57:04 2005//
 /qemu-binfmt-conf.sh/1.4/Tue Dec  6 21:43:35 2005//
+/qemu-doc.texi/1.80/Sun Feb  5 04:14:41 2006//
 /qemu-img.c/1.8/Sun Jul 24 18:44:55 2005//
 /qemu-img.texi/1.2/Sat Jul 23 17:43:14 2005//
 /qemu-tech.texi/1.8/Sat Jul 23 14:27:54 2005//
@@ -98,5 +99,4 @@
 D/target-ppc////
 D/target-sparc////
 D/tests////
-/vl.c/1.164/Mon Feb 13 19:35:11 2006//
-/qemu-doc.texi/1.80/Mon Feb 13 20:09:02 2006//
+/vl.c/1.164/Mon Feb 13 19:10:42 2006//
diff -BurN qemu/qemu-doc.texi qemu-smb/qemu-doc.texi
--- qemu/qemu-doc.texi	Mon Feb 13 12:09:02 2006
+++ qemu-smb/qemu-doc.texi	Mon Feb 13 11:34:10 2006
@@ -348,7 +348,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.
@@ -361,6 +361,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	Mon Feb 13 11:35:11 2006
+++ qemu-smb/vl.c	Mon Feb 13 11:34:10 2006
@@ -2045,6 +2045,9 @@
 {
     char smb_conf[1024];
     char smb_cmdline[1024];
+    char smb_export[1024];
+    char *smb_share;
+    char *smb_path;
     FILE *f;
 
     if (!slirp_inited) {
@@ -2074,18 +2077,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);
 
