qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kosma <kosmam@op.pl>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] -smb switch and national character support
Date: Thu, 11 May 2006 18:35:18 +0200	[thread overview]
Message-ID: <446367C6.6020906@op.pl> (raw)

[-- 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"

                 reply	other threads:[~2006-05-11 16:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=446367C6.6020906@op.pl \
    --to=kosmam@op.pl \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).