delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/05/08/16:18:48

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
From: Chris Faylor <cgf AT cygnus DOT com>
Date: Mon, 8 May 2000 17:20:57 -0400
To: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: stat() behavior differs on Win9x and WinNT
Message-ID: <20000508172057.B1920@cygnus.com>
Reply-To: cygwin-developers AT sourceware DOT cygnus DOT com
Mail-Followup-To: cgf AT cygnus DOT com, cygwin-developers AT sourceware DOT cygnus DOT com
References: <779F20BCCE5AD31186A50008C75D997917171E AT silldn_mail1 DOT sanwaint DOT com> <39168E39 DOT E3A4494D AT vinschen DOT de>
Mime-Version: 1.0
User-Agent: Mutt/1.1.12i
In-Reply-To: <39168E39.E3A4494D@vinschen.de>; from corinna@vinschen.de on Mon, May 08, 2000 at 11:51:53AM +0200

On Mon, May 08, 2000 at 11:51:53AM +0200, Corinna Vinschen wrote:
>"Fifer, Eric" wrote:
>> 
>> With recent snapshots, stat() of a file with an invalid name,
>> like stat("abc>def") ('>' is not allowed in file names), does
>> not fail on Win98:
>> [...]
>>   Win98:
>>     symlink_info::check: GetFileAttributesA (c:\efifer\opt\abc>def) failed
>>     seterrno: 161 (BAD_PATHNAME) -> 22
>>     [...]
>> 
>>   WinNT:
>>     symlink_info::check: GetFileAttributesA (c:\efifer\opt\abc>def) failed
>>     seterrno: 123 (INVALID_NAME) -> 2
>> 
>> A patch is trival, but I'm not sure which is correct:
>> 
>>   + map BAD_PATHNAME to ENOENT (instead of the current EINVAL), but
>>     I have no idea how widespread the impact of this might be.  Or,
>>     maybe INVALID_NAME should really be EINVAL?
>> 
>>   + change the test in stat_worker to:
>> 
>>       (!oret && get_errno () != ENOENT && get_errno () != EINVAL)
>
>IMO the mapping ERROR_BAD_PATHNAME -> EINVAL is incorrect.

I agree.  Is the closest UNIX equivalent ENOENT?  If so, let's make this
change.

cgf

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019