public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] Cygwin: chattr: fix description of requirements for casesensitive directories
@ 2023-04-03 20:41 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2023-04-03 20:41 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=be2749cd4eb6e7ea1b70eaf7cd78f683db21c8ec

commit be2749cd4eb6e7ea1b70eaf7cd78f683db21c8ec
Author:     Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Mon Apr 3 22:41:07 2023 +0200
Commit:     Corinna Vinschen <corinna@vinschen.de>
CommitDate: Mon Apr 3 22:41:07 2023 +0200

    Cygwin: chattr: fix description of requirements for casesensitive directories
    
    Preconditions of WSL or empty directories dependent on Windows
    versions was totally screwed up.  Drop the description from
    --help, describe the preconditions for case-sensitive dirs in the
    man page instead.
    
    Fixes: fc6e89c937c1 ("Cygwin: chattr: clarify requirements for casesensitive directories")
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/doc/utils.xml  | 22 +++++++++++++++++++---
 winsup/utils/chattr.c |  5 +----
 2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/winsup/doc/utils.xml b/winsup/doc/utils.xml
index a90db5e665ed..0390db20fd8a 100644
--- a/winsup/doc/utils.xml
+++ b/winsup/doc/utils.xml
@@ -89,11 +89,27 @@
 			content indexing service
   'e', 'Encrypted':     file is encrypted
   'C', 'Casesensitive': directory is handled case sensitive
-                        - local NTFS only
-                        - Windows 10 1803 or later: requires installed WSL
-                        - Windows 11: enabling requires empty dir
     </screen>
     </refsect1>
+
+    <refsect1 id="chattr-Cprec">
+      <title>Case-sensitive directories</title>
+      <para>Case-sensitive directories are supported starting with
+        Windows 10 1803.  They are only supported on local NTFS filesystems.
+	</para>
+      <para>The system-wide availability of case-sensitive directories
+	depends on the setting of the registry value of type DWORD called
+	HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsEnableDirCaseSensitivity.  The value 0 disables case-sensitive directories.
+	The value 1 enables case-sensitive directories.  The value 3
+	enables case-sensitive directories, too, with the additional
+	requirement that a directory can only be set to case-sensitive
+	if it's empty.  No other value is supported.</para>
+      <para>Removing case-sensitivity on a directory requires that the
+        directory does not contain files only differing by case.</para>
+      <para>Trying to access a case-sensitive directory on a remote NTFS leads
+	to all kinds of weird errors and is therefore
+	<emphasis>not</emphasis> recommended.</para>
+    </refsect1>
   </refentry>
 
     <refentry id="cygcheck">
diff --git a/winsup/utils/chattr.c b/winsup/utils/chattr.c
index 2438d79b482b..4b074133cf6f 100644
--- a/winsup/utils/chattr.c
+++ b/winsup/utils/chattr.c
@@ -264,10 +264,7 @@ usage (FILE *stream)
       "  'n', 'Notindexed':    file or directory is not to be indexed by the\n"
       "                        content indexing service\n"
       "  'e', 'Encrypted':     file is encrypted\n"
-      "  'C', 'Casesensitive': directory is handled case sensitive\n"
-      "                        - local NTFS only\n"
-      "                        - Windows 10 1803 or later: requires installed WSL\n"
-      "                        - Windows 11: enabling requires empty dir\n");
+      "  'C', 'Casesensitive': directory is handled case sensitive\n");
   exit (stream == stdout ? 0 : 1);
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-03 20:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-03 20:41 [newlib-cygwin/main] Cygwin: chattr: fix description of requirements for casesensitive directories Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).