From db031c687bb2aaf356c778d2c270b369ab83ec15 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 6 Apr 1998 18:43:28 +0000 Subject: Use a different errno (ELOOP (as sef mentioned) since the text that goes with the error sounds ok for the condition) if O_NOFOLLOW gets a link. --- sys/kern/vfs_vnops.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sys/kern/vfs_vnops.c') diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index b243967..7d022aa 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94 - * $Id: vfs_vnops.c,v 1.51 1998/04/06 17:38:42 peter Exp $ + * $Id: vfs_vnops.c,v 1.52 1998/04/06 18:25:21 peter Exp $ */ #include @@ -125,7 +125,11 @@ vn_open(ndp, fmode, cmode) return (error); vp = ndp->ni_vp; } - if (vp->v_type == VSOCK || vp->v_type == VLNK) { + if (vp->v_type == VLNK) { + error = ELOOP; + goto bad; + } + if (vp->v_type == VSOCK) error = EOPNOTSUPP; goto bad; } -- cgit v1.1