-static int psem_read (struct fileproc *fp, struct uio *uio,
- kauth_cred_t cred, int flags, struct proc *p);
-static int psem_write (struct fileproc *fp, struct uio *uio,
- kauth_cred_t cred, int flags, struct proc *p);
-static int psem_ioctl (struct fileproc *fp, u_long com,
- caddr_t data, struct proc *p);
-static int psem_select (struct fileproc *fp, int which, void *wql, struct proc *p);
-static int psem_closefile (struct fileglob *fp, struct proc *p);
-
-static int psem_kqfilter (struct fileproc *fp, struct knote *kn, struct proc *p);
-
-struct fileops psemops =
- { psem_read, psem_write, psem_ioctl, psem_select, psem_closefile, psem_kqfilter, 0 };
-
+static int psem_closefile(struct fileglob *fp, vfs_context_t ctx);
+static int psem_unlink_internal(struct pseminfo *pinfo, struct psemcache *pcache);
+
+static const struct fileops psemops = {
+ .fo_type = DTYPE_PSXSEM,
+ .fo_read = fo_no_read,
+ .fo_write = fo_no_write,
+ .fo_ioctl = fo_no_ioctl,
+ .fo_select = fo_no_select,
+ .fo_close = psem_closefile,
+ .fo_drain = fo_no_drain,
+ .fo_kqfilter = fo_no_kqfilter,
+};