Lines Matching refs:file
30 if (fd >= 0 && fd < elementsof(state.file))
39 if (state.file[fd].dir)
41 free(state.file[fd].dir);
42 state.file[fd].dir = 0;
45 if (rp = state.file[fd].reserved)
53 state.file[nfd].reserved = rp;
54 state.file[nfd].flags = FILE_LOCK;
55 state.file[fd].reserved = 0;
59 if ((mp = state.file[fd].mount) && fssys(mp, MSG_close))
68 if ((state.file[fd].flags & FILE_OPEN) ? FSTAT(fd, &state.path.st) : fileinit(fd, NiL, NiL, 0))
72 if (state.file[fd].flags)
74 state.file[fd].flags = 0;
75 state.file[fd].mount = 0;
77 while (state.cache > 1 && !state.file[--state.cache].flags);