From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 2D26B3858D39; Mon, 3 Apr 2023 20:41:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D26B3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680554479; bh=FcquraECfTm6jFph9qPo070dNcflxuLsKUMDd0I61r4=; h=From:To:Subject:Date:From; b=W7C28vUTc0whrXZ2bIidTM/M0v/EUfwSPb19RicPyYP+J/zYxC7v3j9BVs4Yy8zUj VXKYAp4txNmr8J4jWitTk8F7v8rIxOnFfE4Sy6SbJPAKG3bKzr59Aezr05lOyFUlX1 McEz0fNESSUjNMg15I4rbyOBMvRUF6IsvbpKrnzg= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: chattr: fix description of requirements for casesensitive directories X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/main X-Git-Oldrev: cc8404039f50c36100fbad85a3af22d579d3576a X-Git-Newrev: be2749cd4eb6e7ea1b70eaf7cd78f683db21c8ec Message-Id: <20230403204119.2D26B3858D39@sourceware.org> Date: Mon, 3 Apr 2023 20:41:19 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3Dbe2749cd4eb= 6e7ea1b70eaf7cd78f683db21c8ec commit be2749cd4eb6e7ea1b70eaf7cd78f683db21c8ec Author: Corinna Vinschen AuthorDate: Mon Apr 3 22:41:07 2023 +0200 Commit: Corinna Vinschen CommitDate: Mon Apr 3 22:41:07 2023 +0200 Cygwin: chattr: fix description of requirements for casesensitive direc= tories =20 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. =20 Fixes: fc6e89c937c1 ("Cygwin: chattr: clarify requirements for casesens= itive directories") Signed-off-by: Corinna Vinschen 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 + + + Case-sensitive directories + Case-sensitive directories are supported starting with + Windows 10 1803. They are only supported on local NTFS filesystem= s. + + 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\NtfsEnable= DirCaseSensitivity. 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. + Removing case-sensitivity on a directory requires that the + directory does not contain files only differing by case. + Trying to access a case-sensitive directory on a remote NTFS l= eads + to all kinds of weird errors and is therefore + not recommended. + =20 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 t= he\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 instal= led WSL\n" - " - Windows 11: enabling requires empty dir\n= "); + " 'C', 'Casesensitive': directory is handled case sensitive\n"); exit (stream =3D=3D stdout ? 0 : 1); }