Lines Matching refs:fd
180 mfile->fd = open(mfile->path, O_RDWR); in mmap_file()
181 if (mfile->fd < 0) { in mmap_file()
193 mfile->fd, 0); in mmap_file()
202 close(mfile->fd); in mmap_file()
218 close(mfile->fd); in unmap_file()
319 int fd, res; in append_file() local
324 fd = open(filename, O_WRONLY | O_APPEND); in append_file()
325 if (fd < 0) in append_file()
328 res = write(fd, text, tlen); in append_file()
329 close(fd); in append_file()
1132 int fd = 0; in read_file() local
1143 fd = open(path, O_RDONLY); in read_file()
1144 if (fd < 0) in read_file()
1148 result = read(fd, (void *)tmp, 1024); in read_file()
1166 close(fd); in read_file()
1176 close(fd); in read_file()