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