From: Ian Darwin Date: Mon, 9 Nov 1992 11:53:31 +0000 (+0000) Subject: Failure to read a symlink is no longer fatal; just report as unreadable. X-Git-Tag: FILE3_27~211 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cfc5f999448e35bbdfdb9cd95b4e65cb5962fd2c;p=file Failure to read a symlink is no longer fatal; just report as unreadable. --- diff --git a/src/fsmagic.c b/src/fsmagic.c index 2b4104e6..fceb0545 100644 --- a/src/fsmagic.c +++ b/src/fsmagic.c @@ -46,7 +46,7 @@ #ifndef lint static char *moduleid = - "@(#)$Id: fsmagic.c,v 1.20 1992/09/11 12:52:46 ian Exp $"; + "@(#)$Id: fsmagic.c,v 1.21 1992/11/09 11:53:31 ian Exp $"; #endif /* lint */ int @@ -105,9 +105,9 @@ struct stat *sb; struct stat tstatbuf; if ((nch = readlink(fn, buf, BUFSIZ-1)) <= 0) { - error("readlink failed (%s).\n", + ckfprintf(stdout, "unreadable symlink (%s).", strerror(errno)); - /*NOTREACHED*/ + return 1; } buf[nch] = '\0'; /* readlink(2) forgets this */