delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/10/13/11:18:32

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-developers-unsubscribe-archive-cygwin-developers=delorie DOT com AT sourceware DOT cygnus DOT com>
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: Wed, 13 Oct 1999 11:20:30 -0400
To: Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
Cc: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: readlink() bug.
Message-ID: <19991013112030.A984@cygnus.com>
Mail-Followup-To: Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>,
cygwin-developers AT sourceware DOT cygnus DOT com
References: <s1sg0zg9kih DOT fsf AT jaist DOT ac DOT jp>
Mime-Version: 1.0
X-Mailer: Mutt 0.95.6i
In-Reply-To: <s1sg0zg9kih.fsf@jaist.ac.jp>; from Kazuhiro Fujieda on Wed, Oct 13, 1999 at 09:23:02AM +0900

Applied.  Thanks.

-chris

On Wed, Oct 13, 1999 at 09:23:02AM +0900, Kazuhiro Fujieda wrote:
>readlink() should return ENOENT and not EINVAL when it can't
>find the target symlink.
>
>ChangeLog:
>Wed Oct 13 09:02:32 1999  Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
>	* path.cc (readlink): Return errno correctly when it can't find
>	the target symlink.
>
>--- path.cc-	Wed Oct 13 09:02:02 1999
>+++ path.cc	Wed Oct 13 09:02:32 1999
>@@ -2224,6 +2224,9 @@ readlink (const char *path, char *buf, i
>       return -1;
>     }
> 
>+  if (pathbuf.fileattr == (DWORD) -1)
>+    return -1;
>+
>   if (!pathbuf.issymlink ())
>     {
>       set_errno (EINVAL);

- Raw text -


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