From 193afe01895ae2865a0e63513e5ac242f293daf2 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 6 Apr 1998 18:43:28 +0000 Subject: [PATCH] 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(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index b2439676a567..7d022aa6f427 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; }