Lines Matching defs:buffer
283 // Check attribute record. (Only what is in the buffer)
570 * All checks that can be satisfied only by data from the buffer.
573 * The buffer is changed by removing the Update Sequence.
579 static BOOL check_file_record(u8 *buffer, u16 buflen)
583 MFT_RECORD *mft_rec = (MFT_RECORD *)buffer;
618 usa = *(u16*)(buffer+usa_ofs); // The value that should be at the end of every sector.
622 u16 *fixup = (u16*)(buffer+NTFS_BLOCK_SIZE*i-2); // the value at the end of the sector.
623 u16 saved_val = *(u16*)(buffer+usa_ofs+2*i); // the actual data value that was saved in the us array.
629 attr_rec = (ATTR_REC *)(buffer + attrs_offset);
630 while ((u8*)attr_rec<=buffer+buflen-4) {
632 // Check attribute record. (Only what is in the buffer)
637 if ((u8*)attr_rec>buffer+buflen-8) {
652 // todo: an attribute should be at the offset to first attribute, and the offset should be inside the buffer. It should have the value of "next attribute id".
672 u8 *buffer;
687 buffer = ntfs_malloc(vol->mft_record_size);
688 if (!buffer)
692 if (ntfs_attr_pread(vol->mft_na, mft_num*vol->mft_record_size, vol->mft_record_size, buffer) < 0) {
697 check_file_record(buffer, vol->mft_record_size);
711 if (buffer)
712 free(buffer);