Hi Jan,
> Right. That in itself is fine, but I'd still like to have readdir
> return lowercase names here then.you are in luck!
It just so happens that this is what happens when we use the patch
that Hirofumi and I just agreed on (ie. the case handling part of my
patch from May, combined with the current patch).I include it below. Can you please test it? It should be applied on
top of the previous patch. Note that you will not need to specify
shortname=winnt. In fact, if you don't specify any special options and
let the kernel default then you will get the behaviour you just
described.Hirofumi-san, can you have a look at this too and see if it is how you
want to handle it? I built the patch against your fatfs-2.6 tree.Cheers, Tridge
From 244a8ebe72288a261e68b5aea04a86793a2f11f4 Mon Sep 17 00:00:00 2001
From: Andrew Tridgell
Date: Fri, 3 Jul 2009 22:15:02 +1000
Subject: [PATCH] Force case handling when dualnames are disabled for greater compatibilityWhen CONFIG_VFAT_FS_DUALNAMES is not set and a 8.3 name is created,
force the use of the shortname=winnt option to allow for lowercase or
uppercase prefix and extensions without using a long name.Signed-off-by: Andrew Tridgell
---
fs/fat/namei_vfat.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
index 894f44d..9555a46 100644
--- a/fs/fat/namei_vfat.c
+++ b/fs/fat/namei_vfat.c
@@ -317,6 +317,11 @@ static int vfat_create_shortname(struct inode *dir, struct nls_table *nls,
int sz = 0, extlen, baselen, i, numtail_baselen, numtail2_baselen;
int is_shortname;
struct shortname_info base_info, ext_info;
+ unsigned opts_shortname = opts->shortname;
+
+#ifndef CONFIG_VFAT_FS_DUALNAMES
+ opts_shortname = VFAT_SFN_CREATE_WINNT;
+#endifis_shortname = 1;
INIT_SHORTNAME_INFO(&base_info);
@@ -429,9 +434,9 @@ static int vfat_create_shortname(struct inode *dir, struct nls_table *nls,
if (vfat_find_form(dir, name_res) == 0)
return -EEXIST;- if (opts->shortname & VFAT_SFN_CREATE_WIN95) {
+ if (opts_shortname & VFAT_SFN_CREATE_WIN95) {
return (base_info.upper && ext_info.upper);
- } else if (opts->shortname & VFAT_SFN_CREATE_WINNT) {
+ } else if (opts_shortname & VFAT_SFN_CREATE_WINNT) {
if ((base_info.upper || base_info.lower) &&
(ext_info.upper || ext_info.lower)) {
if (!base_info.upper && base_info.lower)
--
1.6.0.4--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Kamalesh Babulal | [BUG] Linux 2.6.25-rc2 - Kernel Ooops while running dbench |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Paul Jackson | Re: cpuset-remove-sched-domain-hooks-from-cpusets |
git: | |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Steven Rostedt | Re: -rt scheduling: wakeup bug? |
| David Miller | Re: [GIT]: Networking |
