Lines Matching refs:filep

99 	struct nfs_files	*filep;  in boot_nfs_closeall()  local
112 while ((filep = nfs_files->next) != NULL) { in boot_nfs_closeall()
113 nfs_files->next = filep->next; in boot_nfs_closeall()
114 bkmem_free((caddr_t)filep, sizeof (struct nfs_files)); in boot_nfs_closeall()
132 struct nfs_files *filep; in get_filep() local
134 for (filep = nfs_files; filep; filep = filep->next) { in get_filep()
135 if (fd == filep->desc) in get_filep()
136 return (filep); in get_filep()
158 struct nfs_files *filep, *newfilep; in boot_nfs_open() local
178 filep = nfs_files; in boot_nfs_open()
181 if (filep->desc == 0) { in boot_nfs_open()
182 filep->desc = file_desc++; in boot_nfs_open()
187 if (filep->next) in boot_nfs_open()
188 filep = filep->next; in boot_nfs_open()
189 } while (filep->next); in boot_nfs_open()
198 filep->next = newfilep; in boot_nfs_open()
199 filep = newfilep; in boot_nfs_open()
200 filep->desc = file_desc++; in boot_nfs_open()
203 if (lookup(path, &filep->file, FALSE) != 0) { in boot_nfs_open()
209 bzero((caddr_t)filep, sizeof (struct nfs_file)); in boot_nfs_open()
210 filep->desc = 0; in boot_nfs_open()
213 bzero(&filep->file.cookie, sizeof (filep->file.cookie)); in boot_nfs_open()
218 path, filep->desc); in boot_nfs_open()
220 return (filep->desc); in boot_nfs_open()
229 struct nfs_files *filep; in boot_nfs_close() local
235 if ((filep = get_filep(fd)) == 0) in boot_nfs_close()
241 bzero((caddr_t)&filep->file, sizeof (struct nfs_file)); in boot_nfs_close()
246 filep->desc = 0; in boot_nfs_close()
257 struct nfs_files *filep; in boot_nfs_read() local
275 if ((filep = get_filep(fd)) == 0) in boot_nfs_read()
278 switch (filep->file.version) { in boot_nfs_read()
280 count = nfsread(&filep->file, buf, size); in boot_nfs_read()
283 count = nfs3read(&filep->file, buf, size); in boot_nfs_read()
286 count = nfs4read(&filep->file, buf, size); in boot_nfs_read()
290 filep->file.version); in boot_nfs_read()
309 struct nfs_files *filep; in boot_nfs_lseek() local
321 if ((filep = get_filep(fd)) == 0) in boot_nfs_lseek()
330 filep->file.offset = offset; in boot_nfs_lseek()
336 filep->file.offset += offset; in boot_nfs_lseek()
352 return (filep->file.offset); in boot_nfs_lseek()
372 struct nfs_files *filep; in boot_nfs_fstat() local
385 if ((filep = get_filep(fd)) == 0) in boot_nfs_fstat()
392 switch (filep->file.version) { in boot_nfs_fstat()
394 status = nfsgetattr(&filep->file, &va); in boot_nfs_fstat()
397 status = nfs3getattr(&filep->file, &va); in boot_nfs_fstat()
400 status = nfs4getattr(&filep->file, &va); in boot_nfs_fstat()
404 filep->file.version); in boot_nfs_fstat()
436 struct nfs_files *filep; in boot_nfs_getdents() local
450 if ((filep = get_filep(fd)) == 0) in boot_nfs_getdents()
453 switch (filep->file.version) { in boot_nfs_getdents()
455 status = nfsgetdents(&filep->file, dep, size); in boot_nfs_getdents()
458 status = nfs3getdents(&filep->file, dep, size); in boot_nfs_getdents()
462 filep->file.version); in boot_nfs_getdents()