On Wed, 22 Aug 2007 10:30:15 Corinna Vinschen wrote:
>
> Second, even if a FS appears case-insensitive, it isn't necessarily so.
> NTFS is case-sensitive.  The case-insensitivity is actually handled by
> the Windows kernel.  Basically, a flag in calls to functions taking a
> filename as parameter is all it takes to make a function call
> case-insensitive or not(**).  The Win32 calls all use case-insensitivity.
> Some are switchable to work case-sensitive, but it's not of much help
> since other calls are always case-insensitive.  Cygwin handles all file
> system calls case-insensitive, too.  So far.
>
> So, in the Linux/FAT example we have a case-sensitive OS with a
> case-insensitive FS, with Win32/NTFS (Cygwin/NTFS) we have a
> case-insensitive OS with a case-sensitive FS.  While the NT kernel can
> return information about the case-sensitivity of the underlying FS (***)
> (****), I don't know about other OSes.

I have mounted the NTFS on my Linux (Centos5) using the `mount.cifs'
command. It is a case-sensitive OS with a case-sensitive FS but with
case-insensitive mediator (the XP hosting OS). I think the Cygwin
situation is almost exactly the same. However there is a big difference
in how `mv' works on Cygwin and Linux:

Cygwin test:

# pwd
/U/VID-shared/Incoming/subtitles/tmp

# ll *c
-rwxrwxrwx+ 1 ???????? None 34 Aug 22 23:09 TST.uc

# mv tst.uc TsT.lc
# ll *c
-rwxrwxrwx+ 1 ???????? None 34 Aug 22 23:09 TsT.lc

# mv tst.lc tst.lc
mv: `tst.lc' and `tst.lc' are the same file

# mv Tst.lc tst.lc
mv: `Tst.lc' and `tst.lc' are the same file

Linux test:

# pwd
/ehuds/U/VID-shared/Incoming/subtitles/tmp

# ll *c
-rw-rw---- 1 root root 34 Aug 22 23:09 TsT.lc

# mv tst.lc tst.lc
mv: `tst.lc' and `tst.lc' are the same file

# mv tSt.lc tst.lc

# ll *c
-rwxrwSrwt 1 root root 34 Aug 22 23:09 tst.lc


Please note the difference:
On both system the "mv tst.lc tst.lc" fails with "same file" error,
but "mv Tst.lc tst.lc" (i.e. case change only) fails only on Cygwin,
On the Linux it just works. May be the Cygwin1 DLL or the Cygwin `mv'
should do less checking and so it might `just work' too ?

Ehud.



--
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to