Re: Msdos name alias patch for 2.1.48

Linus Torvalds (
Thu, 7 Aug 1997 10:38:17 -0700 (PDT)

On Thu, 7 Aug 1997, Ingo Molnar wrote:
> But probably this is not a RL problem, WABI, Wine and DosEMU seems to
> translate such names to canonic form anyway, as Linux passes file names in
> lower case chars back currently.

Note that there is a very simple fix for all this, that I'd certainly
like. Does anybody _really_ hate the following (yeah, I know, everybody
but me probably hates it):

- no name aliases. None. Nada.
- "readdir()" always returns a canonical name
- "lookup()" accepts only the canonical name
- "create()" (mkdir/create/etc) only accepts canonical names

If Wabi, Wine and Dosemu all use canonic names anyway, this should be
fine. I'ld like to point out that we should actually not lose anything
with this setup: it's pretty much how a UNIX filesystem works anyway and
as we obviously want wabi/dosemu/wine to work on an ext2 filesystem too,
we aren't really limiting anything here.

The canonical name would be:
- all lower case (translated to all-upper-case on disk when creating
- dot only exists if there is an extension
- spaces (ascii 32, not the other pseudo-spaces that some "clever"
programs use) at the end of the base and the extension are removed.

The "all lower case" thing would actually be a mount option: if somebody
_wants_ to create a case-sensitive MSDOS filesystem he should be able to.
Obviously MSDOS itself would have some problems with it, but hey, we knew
that it was a broken system anyway.