X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 	tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Message-ID: <4BBD3CA9.1090609@gmail.com>
Date: Wed, 07 Apr 2010 20:17:13 -0600
From: Morgan Gangwere <0.fractalus@gmail.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Filesystem Filename touch fail [ was: PLEASE TEST YOUR FS ]
References: <1270678042.14260.1368807709@webmail.messagingengine.com>
In-Reply-To: <1270678042.14260.1368807709@webmail.messagingengine.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 4/7/2010 4:07 PM, Charles Wilson wrote:
> MVFS (ClearCase dynamic view) seems to work fine with both "foo." and "
> foo "
Thats because it's a virtual file system. IBM can say whatever it wants 
defines a filename.

[...]
 > One is a simple shared NTFS drive, I think (volinfo-1.txt). The other is
 > a weird distributed filesystem of some kind (volinfo-2.txt).

Both are NTFS unless one is not.

> $ touch foo.
> touch: cannot touch `foo.': No such file or directory

> $ touch " foo "
> touch: cannot touch ` foo ': No such file or directory

Both of those are invalid under NTFS FS specifications:
"Filenames may contain any character other than NULL (0x0000) but may 
not contain a space (ASCII 0x20, ' ') or period ('.')"

Windows in kernel-space defines this restriction (as defined by Wikipedia):
"""
	Microsoft Windows: Windows kernel forbids the use of characters in 
range 1-31 (i.e., 0x01-0x1F) and characters " * : < > ? \ / |. Although 
NTFS allows each path component (directory or filename) to be 255 
characters long and paths up to about 32767 characters long, the Windows 
kernel only supports paths up to 259 characters long if no UNC is used 
for addressing. Additionally, Windows forbids the use of the MS-DOS 
device names AUX, CLOCK$, COM1, COM2, COM3, COM4, COM5, COM6, COM7, 
COM8, COM9, CON, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9, 
NUL and PRN, as well as these names with any extension (for example, 
AUX.txt), except when using Long UNC paths (ex. \\.\C:\nul.txt or 
\\?\D:\aux\con). (In fact, CLOCK$ may be used if an extension is 
provided.) These restrictions only apply to Windows - Linux, for 
example, allows use of " * : < > ? \ / | even in NTFS.

"""


Since 'touch foo.' would result in doing an fileopen("foo.") this would 
be considered "bad" by Windows AND Linux ( I mounted an NTFS Partition 
and tried 'touch foo.' and was denied it)

-- 

Morgan Gangwere

 >> Why?
 > Because it breaks the logical flow of conversation, plus makes 
messages unreadable.
 >>> Top-Posting is evil.

--
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

