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