summaryrefslogtreecommitdiff
path: root/misc/e2image.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2007-08-11 02:57:31 -0400
committerTheodore Ts'o <tytso@mit.edu>2007-08-11 02:57:31 -0400
commit2eae093081a097a0a611fe2817e1533825dfdd86 (patch)
tree0f34faaeaecd45d818dee4b47ecbb7363b60c53e /misc/e2image.c
parent126a291c768b523bc228b276d3bea82675a86d09 (diff)
downloade2fsprogs-2eae093081a097a0a611fe2817e1533825dfdd86.tar.gz
Clean up applications to not use EXT2FS_ENABLE_SWAPFS or EXT2_FLAG_SWAP_BYTES
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'misc/e2image.c')
-rw-r--r--misc/e2image.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/misc/e2image.c b/misc/e2image.c
index dd13cea5..1fbb2676 100644
--- a/misc/e2image.c
+++ b/misc/e2image.c
@@ -346,9 +346,8 @@ static void scramble_dir_block(ext2_filsys fs, blk_t blk, char *buf)
for (p = buf; p < end-8; p += rec_len) {
dirent = (struct ext2_dir_entry_2 *) p;
rec_len = dirent->rec_len;
-#ifdef EXT2FS_ENABLE_SWAPFS
- if (fs->flags & EXT2_FLAG_SWAP_BYTES)
- rec_len = ext2fs_swab16(rec_len);
+#ifdef WORDS_BIGENDIAN
+ rec_len = ext2fs_swab16(rec_len);
#endif
#if 0
printf("rec_len = %d, name_len = %d\n", rec_len, dirent->name_len);
@@ -359,8 +358,7 @@ static void scramble_dir_block(ext2_filsys fs, blk_t blk, char *buf)
"bad rec_len (%d)\n", (unsigned long) blk,
rec_len);
rec_len = end - p;
-#ifdef EXT2FS_ENABLE_SWAPFS
- if (fs->flags & EXT2_FLAG_SWAP_BYTES)
+#ifdef WORDS_BIGENDIAN
dirent->rec_len = ext2fs_swab16(rec_len);
#endif
continue;