From cfc5f999448e35bbdfdb9cd95b4e65cb5962fd2c Mon Sep 17 00:00:00 2001 From: Ian Darwin Date: Mon, 9 Nov 1992 11:53:31 +0000 Subject: [PATCH] Failure to read a symlink is no longer fatal; just report as unreadable. --- src/fsmagic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 */ -- 2.50.1