[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] ext2fs and TOS domain



Hi,


Frank Naumann a écrit:
> There are also programs out that don't switch to TOS domain but they work
> fine with long/case-sensitive names.

Yes, but I consider this a bad thing. Explanation below.

> Enhancing the Fsfirst/Fsnext emulation solve hopefully your problems.

Just improving Fsfirst/Fsnext is not enough, I think.

Here's how I think minix.xfs handle this :
Fsfirst/Fsnext return uppercased-shortened-cleaned names.
Then a program can : use modified names if they used Fsfirst/Fsnext, or
use the full name, since it could came from the command line or
Dreaddir().
So the xfs has to open the same file when it is asked to access
"ABCDefghijk.aaa" or "ABCDEFGH.AAA". So there should be some code to
find what file to access.
Names can match exactly or the asked name can match the
uppercased-shortened-cleaned name of the file... This is probably turned
off when in Mint domain.

So, to get the same way of handling long filenames on all xfs (minix,
ext2, nfs,...), I have to remove this code from minix.xfs, and re-write
it at the kernel level. I'm still wondering how to handle fatfs for now.
I'll will have to look at the code to be sure. We need this handler to
be generic so I won't write tests such as "if FATFS then a else b".

This is what I want to do to begin. But as you said this way of handling
long filenames has many drawbacks due to the fact that shortened names
are not unique.

That's why I would like to improve this by making any file whose name do
not fit in the 8.3 scheme, or contains any uppercased letter totaly out
of reach from TOS domain. This would solve all duplicate problems. But
as you pointed out, there is a drawback : programs that do no switch to
Mint domain and that used to handle long filenames, won't be able to
anymore.

In my opinion, this is not important, since it would greatly improve
compatibility with old applications. But as other might not think like
me, this should be controled by a MINT.CNF option.

> There are routines in the fatfs.c that validate filenames against TOS/DOS
> convention if you want to reuse it.

Thanks for this information.

> > Do you agree with this ?
> Improvements are always welcome.

Advices too. :) Thanks A LOT for giving me clues.

Anyway don't expect too much from me. If anybody find this modification
usefull and think I'm too slow in doing it, please contact me to provide
some help...

Regards,


Xavier