From: kstailey Date: Sun, 22 Dec 1996 16:05:24 +0000 (+0000) Subject: make spec_advlock() perform indirect call to lf_advlock() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e80472e316ec1b0bd421c95fb4c06ca22912cb3d;p=openbsd make spec_advlock() perform indirect call to lf_advlock() --- diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c index e12d69ef68e..35d3d301038 100644 --- a/sys/kern/spec_vnops.c +++ b/sys/kern/spec_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spec_vnops.c,v 1.7 1996/12/05 16:25:08 kstailey Exp $ */ +/* $OpenBSD: spec_vnops.c,v 1.8 1996/12/22 16:05:24 kstailey Exp $ */ /* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */ /* @@ -707,19 +707,20 @@ int spec_advlock(v) void *v; { -#ifdef FFS - extern int ufs_advlock __P((void *v)); - - return (ufs_advlock(v)); -#else -#ifdef NFSCLIENT - extern int nfs_advlock __P((void *v)); - - return (nfs_advlock(v)); -#else - return (EOPNOTSUPP); -#endif /* NFSCLIENT */ -#endif /* FFS */ + struct vop_advlock_args /* { + struct vnodeop_desc *a_desc; + struct vnode *a_vp; + caddr_t a_id; + int a_op; + struct flock *a_fl; + int a_flags; + } */ *ap = v; + + /* XXX Should call lf_advlock() from here, but no snode. */ + /* Instead call through non-special file on same filesystem. */ + + return (VCALL(ap->a_vp->v_mount->mnt_vnodelist.lh_first, + VOFFSET(vop_advlock), ap)); } /* diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index e12d69ef68e..35d3d301038 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spec_vnops.c,v 1.7 1996/12/05 16:25:08 kstailey Exp $ */ +/* $OpenBSD: spec_vnops.c,v 1.8 1996/12/22 16:05:24 kstailey Exp $ */ /* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */ /* @@ -707,19 +707,20 @@ int spec_advlock(v) void *v; { -#ifdef FFS - extern int ufs_advlock __P((void *v)); - - return (ufs_advlock(v)); -#else -#ifdef NFSCLIENT - extern int nfs_advlock __P((void *v)); - - return (nfs_advlock(v)); -#else - return (EOPNOTSUPP); -#endif /* NFSCLIENT */ -#endif /* FFS */ + struct vop_advlock_args /* { + struct vnodeop_desc *a_desc; + struct vnode *a_vp; + caddr_t a_id; + int a_op; + struct flock *a_fl; + int a_flags; + } */ *ap = v; + + /* XXX Should call lf_advlock() from here, but no snode. */ + /* Instead call through non-special file on same filesystem. */ + + return (VCALL(ap->a_vp->v_mount->mnt_vnodelist.lh_first, + VOFFSET(vop_advlock), ap)); } /*