Lines Matching refs:logfile
94 static int logfile_close(logfile_file *logfile) in logfile_close() argument
96 if (logfile->is_volume) { in logfile_close()
97 if (logfile->na) in logfile_close()
98 ntfs_attr_close(logfile->na); in logfile_close()
99 if (logfile->ni && ntfs_inode_close(logfile->ni)) in logfile_close()
102 if (ntfs_umount(logfile->vol, 0)) in logfile_close()
104 logfile->filename); in logfile_close()
106 if (close(logfile->fd)) in logfile_close()
108 logfile->filename); in logfile_close()
193 logfile_file *logfile) in logfile_open() argument
228 logfile->data_size = na->data_size; in logfile_open()
229 logfile->vol = vol; in logfile_open()
230 logfile->ni = ni; in logfile_open()
231 logfile->na = na; in logfile_open()
249 logfile->data_size = sbuf.st_size; in logfile_open()
250 logfile->fd = fd; in logfile_open()
253 logfile->is_volume = is_volume; in logfile_open()
254 logfile->filename = filename; in logfile_open()
262 static int logfile_pread(logfile_file *logfile, int ofs, int count, u8 *buf) in logfile_pread() argument
266 if (logfile->is_volume) { in logfile_pread()
267 br = (int)ntfs_attr_pread(logfile->na, ofs, count, buf); in logfile_pread()
269 if (lseek(logfile->fd, ofs, SEEK_SET)==-1) { in logfile_pread()
273 br = read(logfile->fd, buf, count); in logfile_pread()
666 logfile_file logfile; in main() local
686 logfile_open(TRUE, argv[1], &logfile); in main()
691 logfile_open(FALSE, argv[2], &logfile); in main()
696 if (logfile.data_size <= buf_size) in main()
697 buf_size = logfile.data_size; in main()
706 logfile_close(&logfile); in main()
710 br = logfile_pread(&logfile, 0, buf_size, buf); in main()
712 logfile_close(&logfile); in main()