Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/file.h
| Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | |||||
| typedef int fo_chown_t(struct file *fp, uid_t uid, gid_t gid, | typedef int fo_chown_t(struct file *fp, uid_t uid, gid_t gid, | ||||
| struct ucred *active_cred, struct thread *td); | struct ucred *active_cred, struct thread *td); | ||||
| typedef int fo_sendfile_t(struct file *fp, int sockfd, struct uio *hdr_uio, | typedef int fo_sendfile_t(struct file *fp, int sockfd, struct uio *hdr_uio, | ||||
| struct uio *trl_uio, off_t offset, size_t nbytes, | struct uio *trl_uio, off_t offset, size_t nbytes, | ||||
| off_t *sent, int flags, int kflags, struct thread *td); | off_t *sent, int flags, int kflags, struct thread *td); | ||||
| typedef int fo_seek_t(struct file *fp, off_t offset, int whence, | typedef int fo_seek_t(struct file *fp, off_t offset, int whence, | ||||
| struct thread *td); | struct thread *td); | ||||
| typedef int fo_fill_kinfo_t(struct file *fp, struct kinfo_file *kif, | typedef int fo_fill_kinfo_t(struct file *fp, struct kinfo_file *kif, | ||||
| struct filedesc *fdp); | struct filedesc *fdp, int lkflags); | ||||
| typedef int fo_flags_t; | typedef int fo_flags_t; | ||||
| struct fileops { | struct fileops { | ||||
| fo_rdwr_t *fo_read; | fo_rdwr_t *fo_read; | ||||
| fo_rdwr_t *fo_write; | fo_rdwr_t *fo_write; | ||||
| fo_truncate_t *fo_truncate; | fo_truncate_t *fo_truncate; | ||||
| fo_ioctl_t *fo_ioctl; | fo_ioctl_t *fo_ioctl; | ||||
| fo_poll_t *fo_poll; | fo_poll_t *fo_poll; | ||||
| ▲ Show 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | |||||
| fo_kqfilter_t invfo_kqfilter; | fo_kqfilter_t invfo_kqfilter; | ||||
| fo_chmod_t invfo_chmod; | fo_chmod_t invfo_chmod; | ||||
| fo_chown_t invfo_chown; | fo_chown_t invfo_chown; | ||||
| fo_sendfile_t invfo_sendfile; | fo_sendfile_t invfo_sendfile; | ||||
| fo_sendfile_t vn_sendfile; | fo_sendfile_t vn_sendfile; | ||||
| fo_seek_t vn_seek; | fo_seek_t vn_seek; | ||||
| fo_fill_kinfo_t vn_fill_kinfo; | fo_fill_kinfo_t vn_fill_kinfo; | ||||
| int vn_fill_kinfo_vnode(struct vnode *vp, struct kinfo_file *kif); | int vn_fill_kinfo_vnode(struct vnode *vp, struct kinfo_file *kif, int lkflags); | ||||
| void finit(struct file *, u_int, short, void *, struct fileops *); | void finit(struct file *, u_int, short, void *, struct fileops *); | ||||
| int fgetvp(struct thread *td, int fd, cap_rights_t *rightsp, | int fgetvp(struct thread *td, int fd, cap_rights_t *rightsp, | ||||
| struct vnode **vpp); | struct vnode **vpp); | ||||
| int fgetvp_exec(struct thread *td, int fd, cap_rights_t *rightsp, | int fgetvp_exec(struct thread *td, int fd, cap_rights_t *rightsp, | ||||
| struct vnode **vpp); | struct vnode **vpp); | ||||
| int fgetvp_rights(struct thread *td, int fd, cap_rights_t *needrightsp, | int fgetvp_rights(struct thread *td, int fd, cap_rights_t *needrightsp, | ||||
| struct filecaps *havecaps, struct vnode **vpp); | struct filecaps *havecaps, struct vnode **vpp); | ||||
| ▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | |||||
| static __inline int | static __inline int | ||||
| fo_seek(struct file *fp, off_t offset, int whence, struct thread *td) | fo_seek(struct file *fp, off_t offset, int whence, struct thread *td) | ||||
| { | { | ||||
| return ((*fp->f_ops->fo_seek)(fp, offset, whence, td)); | return ((*fp->f_ops->fo_seek)(fp, offset, whence, td)); | ||||
| } | } | ||||
| static __inline int | static __inline int | ||||
| fo_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) | fo_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp, | ||||
| int lkflags) | |||||
| { | { | ||||
| return ((*fp->f_ops->fo_fill_kinfo)(fp, kif, fdp)); | return ((*fp->f_ops->fo_fill_kinfo)(fp, kif, fdp, lkflags)); | ||||
| } | } | ||||
| #endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
| #endif /* !SYS_FILE_H */ | #endif /* !SYS_FILE_H */ | ||||