• Home
  • Raw
  • Download

Lines Matching refs:rec_len

383 	unsigned int	rec_len, new_len;  in check_dot()  local
396 (void) ext2fs_get_rec_len(ctx->fs, dirent, &rec_len); in check_dot()
399 if (rec_len < 12) in check_dot()
400 rec_len = dirent->rec_len = 12; in check_dot()
416 if (rec_len > 12) { in check_dot()
417 new_len = rec_len - 12; in check_dot()
423 dirent->rec_len = 12; in check_dot()
447 unsigned int rec_len; in check_dotdot() local
458 (void) ext2fs_get_rec_len(ctx->fs, dirent, &rec_len); in check_dotdot()
461 if (rec_len < 12) in check_dotdot()
462 dirent->rec_len = 12; in check_dotdot()
717 unsigned int rec_len, prev_rec_len; in salvage_directory() local
727 rec_len = block_len - *offset; in salvage_directory()
730 (void) ext2fs_get_rec_len(fs, dirent, &rec_len); in salvage_directory()
732 left = block_len - *offset - rec_len; in salvage_directory()
739 (rec_len == EXT2_DIR_ENTRY_HEADER_LEN)) { in salvage_directory()
750 ((int) rec_len + left > EXT2_DIR_ENTRY_HEADER_LEN) && in salvage_directory()
751 ((int) ext2fs_dir_rec_len(name_len, hash_in_dirent) <= (int) rec_len + left) && in salvage_directory()
754 (void) ext2fs_set_rec_len(fs, (int) rec_len + left, dirent); in salvage_directory()
762 if (prev && rec_len && (rec_len % 4) == 0 && in salvage_directory()
763 (*offset + rec_len <= block_len)) { in salvage_directory()
765 prev_rec_len += rec_len; in salvage_directory()
767 *offset += rec_len; in salvage_directory()
782 rec_len = block_len - *offset; in salvage_directory()
783 (void) ext2fs_set_rec_len(fs, rec_len, dirent); in salvage_directory()
790 #define NEXT_DIRENT(d) ((void *)((char *)(d) + (d)->rec_len))
800 while (d->rec_len && !(d->rec_len & 0x3) && NEXT_DIRENT(d) <= top) in insert_dirent_tail()
808 d->rec_len = (char *)top - (char *)d; in insert_dirent_tail()
920 unsigned int rec_len; in check_dir_block() local
1096 (void) ext2fs_get_rec_len(fs, dirent, &rec_len); in check_dir_block()
1117 (rec_len == fs->blocksize) && in check_dir_block()
1185 rec_len = ext2fs_dir_rec_len(1, extended); in check_dir_block()
1187 (void) ext2fs_get_rec_len(fs, dirent, &rec_len); in check_dir_block()
1190 if ((offset + rec_len > max_block_size) || in check_dir_block()
1191 (rec_len < min_dir_len) || in check_dir_block()
1192 ((rec_len % 4) != 0) || in check_dir_block()
1194 extended)) > rec_len)) { in check_dir_block()
1217 if (rec_len < EXT2_DIR_ENTRY_HEADER_LEN || rec_len % 4) { in check_dir_block()
1232 dirent, &rec_len); in check_dir_block()
1234 ((char *)dirent) + offset + rec_len, in check_dir_block()
1235 max_block_size - offset - rec_len, in check_dir_block()
1249 dirent->rec_len = EXT2_DIR_REC_LEN(1); in check_dir_block()
1257 dirent->rec_len = EXT2_DIR_REC_LEN(2); in check_dir_block()
1518 (void) ext2fs_get_rec_len(fs, dirent, &rec_len); in check_dir_block()
1520 offset += rec_len; in check_dir_block()
1554 cd->pctx.num = rec_len + offset - max_block_size; in check_dir_block()
1556 dirent->rec_len = cd->pctx.num; in check_dir_block()