delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/05/08/04:56:14

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
Message-ID: <39168E39.E3A4494D@vinschen.de>
Date: Mon, 08 May 2000 11:51:53 +0200
From: Corinna Vinschen <corinna AT vinschen DOT de>
Reply-To: cygwin-developers AT sourceware DOT cygnus DOT com
Organization: Cygnus Solutions, a Red Hat Company
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.14 i686)
X-Accept-Language: de, en
MIME-Version: 1.0
To: "Fifer, Eric" <EFifer AT sanwaint DOT com>
CC: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: stat() behavior differs on Win9x and WinNT
References: <779F20BCCE5AD31186A50008C75D997917171E AT silldn_mail1 DOT sanwaint DOT com>

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

Corinna

- Raw text -


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