aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs
diff options
context:
space:
mode:
Diffstat (limited to 'e2fsprogs')
-rw-r--r--e2fsprogs/ext2fs/ext_attr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/e2fsprogs/ext2fs/ext_attr.c b/e2fsprogs/ext2fs/ext_attr.c
index 17610a914..ca9f9e20c 100644
--- a/e2fsprogs/ext2fs/ext_attr.c
+++ b/e2fsprogs/ext2fs/ext_attr.c
@@ -41,16 +41,14 @@ errcode_t ext2fs_write_ext_attr(ext2_filsys fs, blk_t block, void *inbuf)
41 char *write_buf; 41 char *write_buf;
42 char *buf = NULL; 42 char *buf = NULL;
43 43
44#if BB_BIG_ENDIAN 44 if (BB_BIG_ENDIAN && ((fs->flags & EXT2_FLAG_SWAP_BYTES) ||
45 if ((fs->flags & EXT2_FLAG_SWAP_BYTES) || 45 (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE))) {
46 (fs->flags & EXT2_FLAG_SWAP_BYTES_WRITE)) {
47 retval = ext2fs_get_mem(fs->blocksize, &buf); 46 retval = ext2fs_get_mem(fs->blocksize, &buf);
48 if (retval) 47 if (retval)
49 return retval; 48 return retval;
50 write_buf = buf; 49 write_buf = buf;
51 ext2fs_swap_ext_attr(buf, inbuf, fs->blocksize, 1); 50 ext2fs_swap_ext_attr(buf, inbuf, fs->blocksize, 1);
52 } else 51 } else
53#endif
54 write_buf = (char *) inbuf; 52 write_buf = (char *) inbuf;
55 retval = io_channel_write_blk(fs->io, block, 1, write_buf); 53 retval = io_channel_write_blk(fs->io, block, 1, write_buf);
56 if (buf) 54 if (buf)