Lines Matching refs:file
33 if (nfd >= 0 && ofd >= 0 && ofd < elementsof(state.file))
37 if (!(state.file[ofd].flags & FILE_OPEN))
39 state.file[nfd] = state.file[ofd];
40 state.file[nfd].flags &= ~FILE_CLOEXEC;
41 state.file[nfd].reserved = 0;
46 if (mp = state.file[nfd].mount)
53 if (state.file[nfd].dir)
55 free(state.file[nfd].dir);
56 state.file[nfd].dir = 0;
58 if (state.file[ofd].dir && (state.file[nfd].dir = newof(0, Dir_t, 1, strlen(state.file[ofd].dir->path))))
60 strcpy(state.file[nfd].dir->path, state.file[ofd].dir->path);
61 state.file[nfd].dir->dev = state.file[ofd].dir->dev;
62 state.file[nfd].dir->ino = state.file[ofd].dir->ino;
81 if (r >= 0 && r < elementsof(state.file))