Whamcloud - gitweb
dirblock.c (ext2fs_read_dir_block2, ext2fs_write_dir_block): New
authorTheodore Ts'o <tytso@mit.edu>
Tue, 12 Mar 2002 06:05:06 +0000 (01:05 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 12 Mar 2002 06:05:06 +0000 (01:05 -0500)
commitf9190c8a95c6b76eac567d5896b3ed06ed2a3ada
treec30289fb49e3953a122e8f1b2011f1bd842045b6
parent52783e0ca72a80c549e9d266b3472f78fc61bdb2
dirblock.c (ext2fs_read_dir_block2, ext2fs_write_dir_block): New
functions which take an extra flags argument.  The flag
EXT2_DIRBLOCK_V2_STRUCT will reverse when the name_len
field is byte swampped on big-endian machines, since in
the V2 structure, name_len is a char field which is
doesn't need to be byte swapped --- except if an
old-style kernel had byte-swapped the name_len field
as part of the V1 structure.

Also fixed a bug in debugfs which used ext2_dir_entry_2 without
worrying about the above issue, with the net result that "ls -l"
would print an incorrect file type on big-endian systems.
debugfs/ChangeLog
debugfs/ls.c
lib/ext2fs/ChangeLog
lib/ext2fs/dirblock.c
lib/ext2fs/ext2fs.h