qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] -smb switch and national character support
@ 2006-05-11 16:35 Kosma
  0 siblings, 0 replies; only message in thread
From: Kosma @ 2006-05-11 16:35 UTC (permalink / raw)
  To: qemu-devel

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

With the default settings, using -smb switch causes the national 
characters in shared files' names to display incorrectly. I've put 
together a simple patch (attached for reference only) that addresses 
this issue. As this feature looks useful for me, I thought it would be 
nice to include such functionality in qemu.

The idea is simple - using -smb-dos-charset and -smb-unix-charset 
switches to archieve the desired goal. Example usage:

	qemu -smb-dos-charset cp852 -smb-unix-charset iso8859-2

Also, another switch, named for example -smb-read-only, would be useful. 
As the number of options is growing, it might be better to introduce 
another form:

	-qemu-options dos-charset=cp852,read-only,...

Or, making a more general approach:

	-smb directory[,options]

As it is with -net and other switches. However, the charset settings 
should be put in the [global] section. We can introduce another switch 
or use a simple and nice hack:

	-smb global,charset=cp852,...

Also, this form of -smb switch would allow to inject _any_ strings into 
the smb.conf file, making it far more flexible.

As always, comments are welcome before I start to work on the code - I 
don't want to make a patch that would be rejected.

Kosma

[-- Attachment #2: qemu-0.7.2-pl.patch --]
[-- Type: text/plain, Size: 517 bytes --]

diff -urp qemu-0.7.2/vl.c qemu-0.7.2-pl/vl.c
--- qemu-0.7.2/vl.c	2005-09-04 19:11:31.000000000 +0200
+++ qemu-0.7.2-pl/vl.c	2006-01-17 00:08:50.000000000 +0100
@@ -1605,6 +1605,9 @@ void net_slirp_smb(const char *exported_
             "log file=%s/log.smbd\n"
             "smb passwd file=%s/smbpasswd\n"
             "security = share\n"
+	    "dos charset=CP852\n"
+	    "unix charset=ISO8859-2\n"
+	    "display charset=ISO8859-2\n"
             "[qemu]\n"
             "path=%s\n"
             "read only=no\n"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-05-11 16:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-11 16:35 [Qemu-devel] -smb switch and national character support Kosma

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