diff options
author | Nathan Scott <nathans@sgi.com> | 2006-03-17 01:29:02 -0500 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-03-17 01:29:02 -0500 |
commit | 6b19f2d87da9908acf1e0f48b4e79cf8bc833811 (patch) | |
tree | 532199e785a22b41a046ff6e5b2a9d99d3eb566a /fs/xfs/xfs_attr_leaf.h | |
parent | 918ae424e18666249cf32f16ba2803061bf1ebb7 (diff) |
[XFS] endianess annotations for xfs_attr_leaf_entry_t
SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25498a
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_attr_leaf.h')
-rw-r--r-- | fs/xfs/xfs_attr_leaf.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/fs/xfs/xfs_attr_leaf.h b/fs/xfs/xfs_attr_leaf.h index 52b771052c57..7fbe4880bb83 100644 --- a/fs/xfs/xfs_attr_leaf.h +++ b/fs/xfs/xfs_attr_leaf.h | |||
@@ -89,10 +89,10 @@ typedef struct xfs_attr_leaf_hdr { /* constant-structure header block */ | |||
89 | } xfs_attr_leaf_hdr_t; | 89 | } xfs_attr_leaf_hdr_t; |
90 | 90 | ||
91 | typedef struct xfs_attr_leaf_entry { /* sorted on key, not name */ | 91 | typedef struct xfs_attr_leaf_entry { /* sorted on key, not name */ |
92 | xfs_dahash_t hashval; /* hash value of name */ | 92 | __be32 hashval; /* hash value of name */ |
93 | __uint16_t nameidx; /* index into buffer of name/value */ | 93 | __be16 nameidx; /* index into buffer of name/value */ |
94 | __uint8_t flags; /* LOCAL/ROOT/SECURE/INCOMPLETE flag */ | 94 | __u8 flags; /* LOCAL/ROOT/SECURE/INCOMPLETE flag */ |
95 | __uint8_t pad2; /* unused pad byte */ | 95 | __u8 pad2; /* unused pad byte */ |
96 | } xfs_attr_leaf_entry_t; | 96 | } xfs_attr_leaf_entry_t; |
97 | 97 | ||
98 | typedef struct xfs_attr_leaf_name_local { | 98 | typedef struct xfs_attr_leaf_name_local { |
@@ -143,8 +143,8 @@ typedef struct xfs_attr_leafblock { | |||
143 | static inline xfs_attr_leaf_name_remote_t * | 143 | static inline xfs_attr_leaf_name_remote_t * |
144 | xfs_attr_leaf_name_remote(xfs_attr_leafblock_t *leafp, int idx) | 144 | xfs_attr_leaf_name_remote(xfs_attr_leafblock_t *leafp, int idx) |
145 | { | 145 | { |
146 | return (xfs_attr_leaf_name_remote_t *) &((char *) | 146 | return (xfs_attr_leaf_name_remote_t *) |
147 | (leafp))[INT_GET((leafp)->entries[idx].nameidx, ARCH_CONVERT)]; | 147 | &((char *)leafp)[be16_to_cpu(leafp->entries[idx].nameidx)]; |
148 | } | 148 | } |
149 | 149 | ||
150 | #define XFS_ATTR_LEAF_NAME_LOCAL(leafp,idx) \ | 150 | #define XFS_ATTR_LEAF_NAME_LOCAL(leafp,idx) \ |
@@ -152,16 +152,15 @@ xfs_attr_leaf_name_remote(xfs_attr_leafblock_t *leafp, int idx) | |||
152 | static inline xfs_attr_leaf_name_local_t * | 152 | static inline xfs_attr_leaf_name_local_t * |
153 | xfs_attr_leaf_name_local(xfs_attr_leafblock_t *leafp, int idx) | 153 | xfs_attr_leaf_name_local(xfs_attr_leafblock_t *leafp, int idx) |
154 | { | 154 | { |
155 | return (xfs_attr_leaf_name_local_t *) &((char *) | 155 | return (xfs_attr_leaf_name_local_t *) |
156 | (leafp))[INT_GET((leafp)->entries[idx].nameidx, ARCH_CONVERT)]; | 156 | &((char *)leafp)[be16_to_cpu(leafp->entries[idx].nameidx)]; |
157 | } | 157 | } |
158 | 158 | ||
159 | #define XFS_ATTR_LEAF_NAME(leafp,idx) \ | 159 | #define XFS_ATTR_LEAF_NAME(leafp,idx) \ |
160 | xfs_attr_leaf_name(leafp,idx) | 160 | xfs_attr_leaf_name(leafp,idx) |
161 | static inline char *xfs_attr_leaf_name(xfs_attr_leafblock_t *leafp, int idx) | 161 | static inline char *xfs_attr_leaf_name(xfs_attr_leafblock_t *leafp, int idx) |
162 | { | 162 | { |
163 | return (&((char *) | 163 | return &((char *)leafp)[be16_to_cpu(leafp->entries[idx].nameidx)]; |
164 | (leafp))[INT_GET((leafp)->entries[idx].nameidx, ARCH_CONVERT)]); | ||
165 | } | 164 | } |
166 | 165 | ||
167 | /* | 166 | /* |