From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FeE8a-0008TA-As for qemu-devel@nongnu.org; Thu, 11 May 2006 12:35:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FeE8W-0008PO-Dg for qemu-devel@nongnu.org; Thu, 11 May 2006 12:35:39 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FeE8W-0008Oy-7Y for qemu-devel@nongnu.org; Thu, 11 May 2006 12:35:36 -0400 Received: from [213.180.130.29] (helo=smtp3.poczta.onet.pl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FeEA4-0002G2-0A for qemu-devel@nongnu.org; Thu, 11 May 2006 12:37:12 -0400 Message-ID: <446367C6.6020906@op.pl> Date: Thu, 11 May 2006 18:35:18 +0200 From: Kosma MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040908080403080700090605" Subject: [Qemu-devel] -smb switch and national character support Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------040908080403080700090605 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit 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 --------------040908080403080700090605 Content-Type: text/plain; name="qemu-0.7.2-pl.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-0.7.2-pl.patch" 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" --------------040908080403080700090605--