aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs/ext2fs/dirblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'e2fsprogs/ext2fs/dirblock.c')
-rw-r--r--e2fsprogs/ext2fs/dirblock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/e2fsprogs/ext2fs/dirblock.c b/e2fsprogs/ext2fs/dirblock.c
index 9f82b5002..4f2bbc11f 100644
--- a/e2fsprogs/ext2fs/dirblock.c
+++ b/e2fsprogs/ext2fs/dirblock.c
@@ -26,14 +26,14 @@ errcode_t ext2fs_read_dir_block2(ext2_filsys fs, blk_t block,
26 char *p, *end; 26 char *p, *end;
27 struct ext2_dir_entry *dirent; 27 struct ext2_dir_entry *dirent;
28 unsigned int name_len, rec_len; 28 unsigned int name_len, rec_len;
29#ifdef EXT2FS_ENABLE_SWAPFS 29#if BB_BIG_ENDIAN
30 unsigned int do_swap; 30 unsigned int do_swap;
31#endif 31#endif
32 32
33 retval = io_channel_read_blk(fs->io, block, 1, buf); 33 retval = io_channel_read_blk(fs->io, block, 1, buf);
34 if (retval) 34 if (retval)
35 return retval; 35 return retval;
36#ifdef EXT2FS_ENABLE_SWAPFS 36#if BB_BIG_ENDIAN
37 do_swap = (fs->flags & (EXT2_FLAG_SWAP_BYTES| 37 do_swap = (fs->flags & (EXT2_FLAG_SWAP_BYTES|
38 EXT2_FLAG_SWAP_BYTES_READ)) != 0; 38 EXT2_FLAG_SWAP_BYTES_READ)) != 0;
39#endif 39#endif
@@ -41,7 +41,7 @@ errcode_t ext2fs_read_dir_block2(ext2_filsys fs, blk_t block,
41 end = (char *) buf + fs->blocksize; 41 end = (char *) buf + fs->blocksize;
42 while (p < end-8) { 42 while (p < end-8) {
43 dirent = (struct ext2_dir_entry *) p; 43 dirent = (struct ext2_dir_entry *) p;
44#ifdef EXT2FS_ENABLE_SWAPFS 44#if BB_BIG_ENDIAN
45 if (do_swap) { 45 if (do_swap) {
46 dirent->inode = ext2fs_swab32(dirent->inode); 46 dirent->inode = ext2fs_swab32(dirent->inode);
47 dirent->rec_len = ext2fs_swab16(dirent->rec_len); 47 dirent->rec_len = ext2fs_swab16(dirent->rec_len);
@@ -75,7 +75,7 @@ errcode_t ext2fs_read_dir_block(ext2_filsys fs, blk_t block,
75errcode_t ext2fs_write_dir_block2(ext2_filsys fs, blk_t block, 75errcode_t ext2fs_write_dir_block2(ext2_filsys fs, blk_t block,
76 void *inbuf, int flags EXT2FS_ATTR((unused))) 76 void *inbuf, int flags EXT2FS_ATTR((unused)))
77{ 77{
78#ifdef EXT2FS_ENABLE_SWAPFS 78#if BB_BIG_ENDIAN
79 int do_swap = 0; 79 int do_swap = 0;
80 errcode_t retval; 80 errcode_t retval;
81 char *p, *end; 81 char *p, *end;