the byte-swapping code all assumes the ext2_dir_entry structure.
(It's a question of whether or not name_len should be byte-swapped or
not, and whether it's a 16 bit or 8 bit field.)
+2001-06-22 Theodore Tso <tytso@valinux.com>
+
+ * dirblock.c (ext2fs_read_dir_block): Remove use of dir_entry_2
+ since the byte-swapping code all assumes the
+ ext2_dir_entry structure. (It's a question of whether or
+ not name_len should be byte-swapped or not, and whether
+ it's a 16 bit or 8 bit field.)
+
2001-06-15 Theodore Tso <tytso@valinux.com>
* Release of E2fsprogs 1.21
errcode_t retval;
char *p, *end;
struct ext2_dir_entry *dirent;
- struct ext2_dir_entry_2 *dirent2;
unsigned int rec_len, do_swap;
retval = io_channel_read_blk(fs->io, block, 1, buf);
rec_len = 8;
retval = EXT2_ET_DIR_CORRUPTED;
}
- dirent2 = (struct ext2_dir_entry_2 *) dirent;
- if ((dirent2->name_len +8) > dirent2->rec_len)
+ if (((dirent->name_len & 0xFF) + 8) > dirent->rec_len)
retval = EXT2_ET_DIR_CORRUPTED;
p += rec_len;
}