@@ -, +, @@ | dirent "." | | ... more ... | dirent "." | dirent ".." | ... more ... | --- e2fsck/pass2.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/e2fsck/pass2.c +++ a/e2fsck/pass2.c @@ -447,6 +447,12 @@ static int check_dot(e2fsck_t ctx, nextdir = (struct ext2_dir_entry *) ((char *) dirent + 12); dirent->rec_len = 12; +#ifdef WORDS_BIGENDIAN + /* We discover new on disk dir entry. + * Account for it's endianness. */ + ext2fs_dirent_swab_in2(ctx->fs, + nextdir, new_len, 0); +#endif /* if the next entry looks like "..", leave it * and let check_dotdot() verify the dirent, * otherwise zap the following entry. */ --