This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Case sensitive filenames for non-NTFS filesystems


On Aug  4 13:08, Linda Walsh wrote:
> Corinna Vinschen wrote:
> >On Aug  3 19:42, Linda Walsh wrote:
> >>Shaddy Baddah wrote:
> >>>This is the output for L: drive, which is not a physical but logical
> >>>volume formatted EXFAT. Hopefully it doesn't alter the
> >>>characteristics/attributes. With a bit of extra effort, I could try with
> >>>a physical device (format a spare USB stick EXFAT through Windows):
> >>>
> >>>$ /usr/lib/csih/getVolInfo.exe /cygdrive/l
> >>...
> >>>Flags              : 6
> >>> FILE_CASE_SENSITIVE_SEARCH  : FALSE
> >>> FILE_CASE_PRESERVED_NAMES   : TRUE
> >>> FILE_UNICODE_ON_DISK        : TRUE
> >>...
> >>
> >>>But I have to admit that the "con" of losing case-preservation is a
> >>>weighty one. I have discussed in the (very distant) past having issues
> >>>with operating on Linux kernel source.
> >>---
> >>	???   Linux preserves and is sensitive to case by default.
> >>According to the above, EXFAT does not have a "con" of losing
> >>case-preservation.  It *is* case-insensitive just like NTFS.
> >
> >No, it isn't.  Did you read the User's Guide?
> >http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive
> ----
> It said case was sensitive depending on how you set the KERNEL setting.
> 
> so the flags above say CASE_SENSITIVE_SEARCH = false, so my saying
> it IS case insensitive just like NTFS -- how is that incorrect?  I'm
> confused?

Yes.  You just make assumptions rather then checking the facts.
FILE_CASE_SENSITIVE_SEARCH is TRUE on NTFS.

> >>Perhaps you are creating files on linux on ex-fat and you have
> >>the linux driver setup to be case sensitive?
> >
> >You didn't read Shaddy's OP.  He was asking to make ExFAT filenames
> >case sensitive *within* Cygwin by adding WCHAR trickery to Cygwin.
> ----
> 	But we don't know (or do we?  not sure about what the flags relfect
> above) -- if the flag in the kernel was toggled to "case sensitive
> for all subsystem,
> wouldn't the above read File Case Sensitive Search=TRUE -- reflecting the kernel
> setting?
> 
> If they can store case, and one tells the kernel to pay attention to case, wouldn't
> it be case sensitive?
> 
> ???
> sorry, don't mean to confuse the issue, but I thought it was the kernel
> setting that chose to be sensitive or not.

The OS handles that in three stages, Cygwin adds one:

- FILE_CASE_SENSITIVE_SEARCH == TRUE

  The filesystem itself is casesensitive.  This is set on NTFS, but not
  on {ex}FAT{32}.  So file operations on NTFS *can* be casesensitive,
  but they can't on FAT.

- The CreateFile/NtCreateFile calls have flags which handle case
  sensitivity.  The default for CreateFile is caseinsensitive, unless
  the FILE_FLAG_POSIX_SEMANTICS is used.  The default for NtCreateFile
  is casesensitive, unless the OBJECT_ATTRIBUTE contains the
  OBJ_CASE_INSENSITIVE flag.

- Starting with XP, the kernel supports a global setting, set by the
  registry key mentioned in the user's guide.  If the obcaseinsensitive
  registry value is set to 1, which is default since XP, all of the
  above is simply ignored.

- Cygwin only:  Mount flag "posix=1" is default, so casesensitivity
  is default, unless
  - the obcaseinsensitive registry value is 1,
  - the filesystem has FILE_CASE_SENSITIVE_SEARCH == FALSE,
  - the mount point is explicitely mounted with "posix=0",
  - the incoming path is a DOS path (drive letter, backslashes).


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]