Lines Matching refs:file

46 static int tty_fops_open(struct dfs_file *file)  in tty_fops_open()  argument
53 if (file->vnode && file->vnode->data) in tty_fops_open()
55 if (file->vnode->ref_count != 1) in tty_fops_open()
61 device = (rt_device_t)file->vnode->data; in tty_fops_open()
63 rc = bsd_ttydev_methods.d_open(tp, file->flags, devtype, in tty_fops_open()
75 static int tty_fops_close(struct dfs_file *file) in tty_fops_close() argument
80 int fflags = FFLAGS(file->flags); in tty_fops_close()
83 if (file->vnode && file->vnode->data) in tty_fops_close()
85 if (file->vnode->ref_count != 1) in tty_fops_close()
91 device = (rt_device_t)file->vnode->data; in tty_fops_close()
104 static int tty_fops_ioctl(struct dfs_file *file, int cmd, void *arg) in tty_fops_ioctl() argument
110 if (file->vnode && file->vnode->data) in tty_fops_ioctl()
112 device = (rt_device_t)file->vnode->data; in tty_fops_ioctl()
114 rc = lwp_tty_ioctl_adapter(tp, cmd, file->flags, arg, rt_thread_self()); in tty_fops_ioctl()
124 static ssize_t tty_fops_read(struct dfs_file *file, void *buf, size_t count, in tty_fops_read() argument
134 int oflags = file->flags; in tty_fops_read()
136 if (file->vnode && file->vnode->data) in tty_fops_read()
138 device = (rt_device_t)file->vnode->data; in tty_fops_read()
149 uio.uio_offset = file->fpos; in tty_fops_read()
166 file->fpos = uio.uio_offset; in tty_fops_read()
175 static ssize_t tty_fops_write(struct dfs_file *file, const void *buf, in tty_fops_write() argument
185 int oflags = file->flags; in tty_fops_write()
187 if (file->vnode && file->vnode->data) in tty_fops_write()
189 device = (rt_device_t)file->vnode->data; in tty_fops_write()
200 uio.uio_offset = file->fpos; in tty_fops_write()
220 file->fpos = uio.uio_offset; in tty_fops_write()
225 static int tty_fops_flush(struct dfs_file *file) in tty_fops_flush() argument
230 static off_t tty_fops_lseek(struct dfs_file *file, off_t offset, int wherece) in tty_fops_lseek() argument
235 static int tty_fops_truncate(struct dfs_file *file, off_t offset) in tty_fops_truncate() argument
244 static int tty_fops_poll(struct dfs_file *file, struct rt_pollreq *req) in tty_fops_poll() argument
250 if (file->vnode && file->vnode->data) in tty_fops_poll()
252 device = (rt_device_t)file->vnode->data; in tty_fops_poll()
265 static int tty_fops_mmap(struct dfs_file *file, struct lwp_avl_struct *mmap) in tty_fops_mmap() argument
270 static int tty_fops_lock(struct dfs_file *file, struct file_lock *flock) in tty_fops_lock() argument
275 static int tty_fops_flock(struct dfs_file *file, int operation, struct file_lock *flock) in tty_fops_flock() argument