Lines Matching refs:file
33 #include <sys/file.h>
44 #undef file
51 struct file *file;
53 /* lookup file pointer by file descriptor index */
54 if (fget_unlocked(curthread, fd, &cap_no_rights, &file) != 0)
57 /* check if file handle really belongs to us */
58 if (file->f_data == NULL ||
59 file->f_ops != &linuxfileops) {
60 fdrop(file, curthread);
63 return ((struct linux_file *)file->f_data);
87 struct file *file;
89 if (fget_unlocked(curthread, fd, &cap_no_rights, &file) != 0) {
94 * installed, so no need to free the associated Linux file
97 fdclose(curthread, file, fd);
100 fdrop(file, curthread);
106 struct file *file;
108 if (fget_unlocked(curthread, fd, &cap_no_rights, &file) != 0) {
111 filp->_file = file;
112 finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops);
114 /* transfer reference count from "filp" to "file" */
116 refcount_acquire(&file->f_count);
126 struct file *file;
130 error = falloc(curthread, &file, &fd, 0);
134 fdrop(file, curthread);
141 struct file *file;
145 error = falloc(curthread, &file, &fd, flags);
149 fdrop(file, curthread);
182 #define file linux_file