Lines Matching refs:fd_map
55 static int fd_map; /* File descriptor for file being modified. */
179 fd_map = -1;
186 fd_map = open(fname, O_RDONLY);
187 if (fd_map < 0) {
191 if (fstat(fd_map, &sb) < 0) {
200 fd_map, 0);
208 if (read(fd_map, file_map, sb.st_size) != sb.st_size) {
217 close(fd_map);
218 fd_map = -1;
344 fd_map = open(tmp_file, O_WRONLY | O_TRUNC | O_CREAT, sb.st_mode);
345 if (fd_map < 0) {
349 n = write(fd_map, file_map, sb.st_size);
352 close(fd_map);
356 n = write(fd_map, file_append, file_append_size);
359 close(fd_map);
363 close(fd_map);