-/* $OpenBSD: spec_vnops.c,v 1.8 1996/12/22 16:05:24 kstailey Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.9 1997/01/04 17:10:04 kstailey Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
#include <sys/ioctl.h>
#include <sys/file.h>
#include <sys/disklabel.h>
+#include <sys/lockf.h>
#include <miscfs/specfs/specdev.h>
struct flock *a_fl;
int a_flags;
} */ *ap = v;
+ register struct vnode *vp = ap->a_vp;
- /* 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));
+ return (lf_advlock(&vp->v_speclockf, (off_t)0, ap->a_id,
+ ap->a_op, ap->a_fl, ap->a_flags));
}
/*
nvp->v_hashchain = vpp;
nvp->v_specnext = *vpp;
nvp->v_specflags = 0;
+ nvp->v_speclockf = NULL;
*vpp = nvp;
if (vp != NULL) {
nvp->v_flag |= VALIASED;
-/* $OpenBSD: spec_vnops.c,v 1.8 1996/12/22 16:05:24 kstailey Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.9 1997/01/04 17:10:04 kstailey Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
#include <sys/ioctl.h>
#include <sys/file.h>
#include <sys/disklabel.h>
+#include <sys/lockf.h>
#include <miscfs/specfs/specdev.h>
struct flock *a_fl;
int a_flags;
} */ *ap = v;
+ register struct vnode *vp = ap->a_vp;
- /* 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));
+ return (lf_advlock(&vp->v_speclockf, (off_t)0, ap->a_id,
+ ap->a_op, ap->a_fl, ap->a_flags));
}
/*
-/* $OpenBSD: specdev.h,v 1.2 1996/02/27 08:05:17 niklas Exp $ */
+/* $OpenBSD: specdev.h,v 1.3 1997/01/04 17:10:05 kstailey Exp $ */
/* $NetBSD: specdev.h,v 1.12 1996/02/13 13:13:01 mycroft Exp $ */
/*
struct vnode *si_specnext;
long si_flags;
dev_t si_rdev;
+ struct lockf *si_lockf;
};
/*
* Exported shorthand
#define v_hashchain v_specinfo->si_hashchain
#define v_specnext v_specinfo->si_specnext
#define v_specflags v_specinfo->si_flags
+#define v_speclockf v_specinfo->si_lockf
/*
* Flags for specinfo
-/* $OpenBSD: specdev.h,v 1.2 1996/02/27 08:05:17 niklas Exp $ */
+/* $OpenBSD: specdev.h,v 1.3 1997/01/04 17:10:05 kstailey Exp $ */
/* $NetBSD: specdev.h,v 1.12 1996/02/13 13:13:01 mycroft Exp $ */
/*
struct vnode *si_specnext;
long si_flags;
dev_t si_rdev;
+ struct lockf *si_lockf;
};
/*
* Exported shorthand
#define v_hashchain v_specinfo->si_hashchain
#define v_specnext v_specinfo->si_specnext
#define v_specflags v_specinfo->si_flags
+#define v_speclockf v_specinfo->si_lockf
/*
* Flags for specinfo