* [PATCH 1/1] e2fsprogs: Swap values in extent header macros.
@ 2008-03-31 15:55 Eric Sandeen
0 siblings, 0 replies; only message in thread
From: Eric Sandeen @ 2008-03-31 15:55 UTC (permalink / raw)
To: ext4 development
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
lib/ext2fs/ext3_extents.h | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/lib/ext2fs/ext3_extents.h b/lib/ext2fs/ext3_extents.h
index ba980e4..8d876f2 100644
--- a/lib/ext2fs/ext3_extents.h
+++ b/lib/ext2fs/ext3_extents.h
@@ -154,15 +154,20 @@ struct ext3_ext_path {
((struct ext3_extent_idx *) (((char *) (__hdr__)) + \
sizeof(struct ext3_extent_header)))
#define EXT_HAS_FREE_INDEX(__path__) \
- ((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max)
+ ((__path__)->p_hdr->eh_entries < \
+ ext2fs_le16_to_cpu((__path__)->p_hdr->eh_max))
#define EXT_LAST_EXTENT(__hdr__) \
- (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1)
+ (EXT_FIRST_EXTENT((__hdr__)) + \
+ ext2fs_le16_to_cpu((__hdr__)->eh_entries) - 1)
#define EXT_LAST_INDEX(__hdr__) \
- (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1)
+ (EXT_FIRST_INDEX((__hdr__)) + \
+ ext2fs_le16_to_cpu((__hdr__)->eh_entries) - 1)
#define EXT_MAX_EXTENT(__hdr__) \
- (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1)
+ (EXT_FIRST_EXTENT((__hdr__)) + \
+ ext2fs_le16_to_cpu((__hdr__)->eh_max) - 1)
#define EXT_MAX_INDEX(__hdr__) \
- (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1)
+ (EXT_FIRST_INDEX((__hdr__)) + \
+ ext2fs_le16_to_cpu((__hdr__)->eh_max) - 1)
#define EXT_ROOT_HDR(tree) \
((struct ext3_extent_header *) (tree)->root)
-- 1.5.4.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-31 15:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-31 15:55 [PATCH 1/1] e2fsprogs: Swap values in extent header macros Eric Sandeen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.