1 #include <sys/param.h> 2 #include <sys/systm.h> 3 #include <sys/kernel.h> 4 #include <sys/mount.h> 5 #include <sys/namei.h> 6 #include <sys/vnode.h> 7 #include <sys/malloc.h> 8 #include <sys/select.h> 9 10 #include <miscfs/genfs/genfs.h> 11 12 int 13 genfs_select(v) 14 void *v; 15 { 16 struct vop_select_args /* { 17 struct vnode *a_vp; 18 int a_which; 19 int a_fflags; 20 struct ucred *a_cred; 21 struct proc *a_p; 22 } */ *ap = v; 23 24 return (1); 25 } 26 27 int 28 genfs_fsync(v) 29 void *v; 30 { 31 struct vop_fsync_args /* { 32 struct vnode *a_vp; 33 struct ucred *a_cred; 34 int a_waitfor; 35 struct proc *a_p; 36 } */ *ap = v; 37 register struct vnode *vp = ap->a_vp; 38 struct timespec ts; 39 40 vflushbuf(vp, ap->a_waitfor == MNT_WAIT); 41 TIMEVAL_TO_TIMESPEC(&time, &ts); 42 return (VOP_UPDATE(ap->a_vp, &ts, &ts, ap->a_waitfor == MNT_WAIT)); 43 } 44 45 int 46 genfs_abortop(v) 47 void *v; 48 { 49 struct vop_abortop_args /* { 50 struct vnode *a_dvp; 51 struct componentname *a_cnp; 52 } */ *ap = v; 53 54 if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF) 55 FREE(ap->a_cnp->cn_pnbuf, M_NAMEI); 56 return (0); 57 } 58 59 /*ARGSUSED*/ 60 int 61 genfs_badop(v) 62 void *v; 63 { 64 65 panic("genfs: bad op"); 66 } 67 68 /*ARGSUSED*/ 69 int 70 genfs_nullop(v) 71 void *v; 72 { 73 74 return (0); 75 } 76 77 /*ARGSUSED*/ 78 int 79 genfs_eopnotsupp(v) 80 void *v; 81 { 82 83 return (EOPNOTSUPP); 84 } 85 86 /*ARGSUSED*/ 87 int 88 genfs_ebadf(v) 89 void *v; 90 { 91 92 return (EBADF); 93 } 94