/*ARGSUSED*/ int cnkqfilter(dev_t dev, struct knote *kn) { int error; /* * Redirect the kqfilter, if that's appropriate. * I don't want to think of the possible side effects * of console redirection here. */ if (!cn_redirect(&dev, 0, &error)) return error; return cdev_kqfilter(dev, kn); }
int ptyfs_kqfilter(void *v) { struct vop_kqfilter_args /* { struct vnode *a_vp; struct knote *a_kn; } */ *ap = v; struct vnode *vp = ap->a_vp; struct ptyfsnode *ptyfs = VTOPTYFS(vp); switch (ptyfs->ptyfs_type) { case PTYFSpts: case PTYFSptc: return cdev_kqfilter(vp->v_rdev, ap->a_kn); default: return genfs_kqfilter(v); } }