diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-04-17 16:41:13 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-29 23:28:39 -0400 |
commit | 28fe3c1963b0bafa56ec92df1987828090151d87 (patch) | |
tree | 021985387ca7d13dafd1571f1c3e9ad6f3051084 /fs/hpfs/hpfs.h | |
parent | 77ee26e44c28823a29bc09091950544566ae7cea (diff) |
hpfs: assorted endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hpfs/hpfs.h')
-rw-r--r-- | fs/hpfs/hpfs.h | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/fs/hpfs/hpfs.h b/fs/hpfs/hpfs.h index 051ff455b26d..cce025aff1b1 100644 --- a/fs/hpfs/hpfs.h +++ b/fs/hpfs/hpfs.h | |||
@@ -51,11 +51,11 @@ struct hpfs_boot_block | |||
51 | u8 n_rootdir_entries[2]; | 51 | u8 n_rootdir_entries[2]; |
52 | u8 n_sectors_s[2]; | 52 | u8 n_sectors_s[2]; |
53 | u8 media_byte; | 53 | u8 media_byte; |
54 | u16 sectors_per_fat; | 54 | __le16 sectors_per_fat; |
55 | u16 sectors_per_track; | 55 | __le16 sectors_per_track; |
56 | u16 heads_per_cyl; | 56 | __le16 heads_per_cyl; |
57 | u32 n_hidden_sectors; | 57 | __le32 n_hidden_sectors; |
58 | u32 n_sectors_l; /* size of partition */ | 58 | __le32 n_sectors_l; /* size of partition */ |
59 | u8 drive_number; | 59 | u8 drive_number; |
60 | u8 mbz; | 60 | u8 mbz; |
61 | u8 sig_28h; /* 28h */ | 61 | u8 sig_28h; /* 28h */ |
@@ -63,7 +63,7 @@ struct hpfs_boot_block | |||
63 | u8 vol_label[11]; | 63 | u8 vol_label[11]; |
64 | u8 sig_hpfs[8]; /* "HPFS " */ | 64 | u8 sig_hpfs[8]; /* "HPFS " */ |
65 | u8 pad[448]; | 65 | u8 pad[448]; |
66 | u16 magic; /* aa55 */ | 66 | __le16 magic; /* aa55 */ |
67 | }; | 67 | }; |
68 | 68 | ||
69 | 69 | ||
@@ -75,28 +75,28 @@ struct hpfs_boot_block | |||
75 | 75 | ||
76 | struct hpfs_super_block | 76 | struct hpfs_super_block |
77 | { | 77 | { |
78 | u32 magic; /* f995 e849 */ | 78 | __le32 magic; /* f995 e849 */ |
79 | u32 magic1; /* fa53 e9c5, more magic? */ | 79 | __le32 magic1; /* fa53 e9c5, more magic? */ |
80 | u8 version; /* version of a filesystem usually 2 */ | 80 | u8 version; /* version of a filesystem usually 2 */ |
81 | u8 funcversion; /* functional version - oldest version | 81 | u8 funcversion; /* functional version - oldest version |
82 | of filesystem that can understand | 82 | of filesystem that can understand |
83 | this disk */ | 83 | this disk */ |
84 | u16 zero; /* 0 */ | 84 | __le16 zero; /* 0 */ |
85 | fnode_secno root; /* fnode of root directory */ | 85 | __le32 root; /* fnode of root directory */ |
86 | secno n_sectors; /* size of filesystem */ | 86 | __le32 n_sectors; /* size of filesystem */ |
87 | u32 n_badblocks; /* number of bad blocks */ | 87 | __le32 n_badblocks; /* number of bad blocks */ |
88 | secno bitmaps; /* pointers to free space bit maps */ | 88 | __le32 bitmaps; /* pointers to free space bit maps */ |
89 | u32 zero1; /* 0 */ | 89 | __le32 zero1; /* 0 */ |
90 | secno badblocks; /* bad block list */ | 90 | __le32 badblocks; /* bad block list */ |
91 | u32 zero3; /* 0 */ | 91 | __le32 zero3; /* 0 */ |
92 | time32_t last_chkdsk; /* date last checked, 0 if never */ | 92 | __le32 last_chkdsk; /* date last checked, 0 if never */ |
93 | time32_t last_optimize; /* date last optimized, 0 if never */ | 93 | __le32 last_optimize; /* date last optimized, 0 if never */ |
94 | secno n_dir_band; /* number of sectors in dir band */ | 94 | __le32 n_dir_band; /* number of sectors in dir band */ |
95 | secno dir_band_start; /* first sector in dir band */ | 95 | __le32 dir_band_start; /* first sector in dir band */ |
96 | secno dir_band_end; /* last sector in dir band */ | 96 | __le32 dir_band_end; /* last sector in dir band */ |
97 | secno dir_band_bitmap; /* free space map, 1 dnode per bit */ | 97 | __le32 dir_band_bitmap; /* free space map, 1 dnode per bit */ |
98 | u8 volume_name[32]; /* not used */ | 98 | u8 volume_name[32]; /* not used */ |
99 | secno user_id_table; /* 8 preallocated sectors - user id */ | 99 | __le32 user_id_table; /* 8 preallocated sectors - user id */ |
100 | u32 zero6[103]; /* 0 */ | 100 | u32 zero6[103]; /* 0 */ |
101 | }; | 101 | }; |
102 | 102 | ||
@@ -109,8 +109,8 @@ struct hpfs_super_block | |||
109 | 109 | ||
110 | struct hpfs_spare_block | 110 | struct hpfs_spare_block |
111 | { | 111 | { |
112 | u32 magic; /* f991 1849 */ | 112 | __le32 magic; /* f991 1849 */ |
113 | u32 magic1; /* fa52 29c5, more magic? */ | 113 | __le32 magic1; /* fa52 29c5, more magic? */ |
114 | 114 | ||
115 | #ifdef __LITTLE_ENDIAN | 115 | #ifdef __LITTLE_ENDIAN |
116 | u8 dirty: 1; /* 0 clean, 1 "improperly stopped" */ | 116 | u8 dirty: 1; /* 0 clean, 1 "improperly stopped" */ |
@@ -153,21 +153,21 @@ struct hpfs_spare_block | |||
153 | u8 mm_contlgulty; | 153 | u8 mm_contlgulty; |
154 | u8 unused; | 154 | u8 unused; |
155 | 155 | ||
156 | secno hotfix_map; /* info about remapped bad sectors */ | 156 | __le32 hotfix_map; /* info about remapped bad sectors */ |
157 | u32 n_spares_used; /* number of hotfixes */ | 157 | __le32 n_spares_used; /* number of hotfixes */ |
158 | u32 n_spares; /* number of spares in hotfix map */ | 158 | __le32 n_spares; /* number of spares in hotfix map */ |
159 | u32 n_dnode_spares_free; /* spare dnodes unused */ | 159 | __le32 n_dnode_spares_free; /* spare dnodes unused */ |
160 | u32 n_dnode_spares; /* length of spare_dnodes[] list, | 160 | __le32 n_dnode_spares; /* length of spare_dnodes[] list, |
161 | follows in this block*/ | 161 | follows in this block*/ |
162 | secno code_page_dir; /* code page directory block */ | 162 | __le32 code_page_dir; /* code page directory block */ |
163 | u32 n_code_pages; /* number of code pages */ | 163 | __le32 n_code_pages; /* number of code pages */ |
164 | u32 super_crc; /* on HPFS386 and LAN Server this is | 164 | __le32 super_crc; /* on HPFS386 and LAN Server this is |
165 | checksum of superblock, on normal | 165 | checksum of superblock, on normal |
166 | OS/2 unused */ | 166 | OS/2 unused */ |
167 | u32 spare_crc; /* on HPFS386 checksum of spareblock */ | 167 | __le32 spare_crc; /* on HPFS386 checksum of spareblock */ |
168 | u32 zero1[15]; /* unused */ | 168 | __le32 zero1[15]; /* unused */ |
169 | dnode_secno spare_dnodes[100]; /* emergency free dnode list */ | 169 | __le32 spare_dnodes[100]; /* emergency free dnode list */ |
170 | u32 zero2[1]; /* room for more? */ | 170 | __le32 zero2[1]; /* room for more? */ |
171 | }; | 171 | }; |
172 | 172 | ||
173 | /* The bad block list is 4 sectors long. The first word must be zero, | 173 | /* The bad block list is 4 sectors long. The first word must be zero, |
@@ -202,18 +202,18 @@ struct hpfs_spare_block | |||
202 | 202 | ||
203 | struct code_page_directory | 203 | struct code_page_directory |
204 | { | 204 | { |
205 | u32 magic; /* 4945 21f7 */ | 205 | __le32 magic; /* 4945 21f7 */ |
206 | u32 n_code_pages; /* number of pointers following */ | 206 | __le32 n_code_pages; /* number of pointers following */ |
207 | u32 zero1[2]; | 207 | __le32 zero1[2]; |
208 | struct { | 208 | struct { |
209 | u16 ix; /* index */ | 209 | __le16 ix; /* index */ |
210 | u16 code_page_number; /* code page number */ | 210 | __le16 code_page_number; /* code page number */ |
211 | u32 bounds; /* matches corresponding word | 211 | __le32 bounds; /* matches corresponding word |
212 | in data block */ | 212 | in data block */ |
213 | secno code_page_data; /* sector number of a code_page_data | 213 | __le32 code_page_data; /* sector number of a code_page_data |
214 | containing c.p. array */ | 214 | containing c.p. array */ |
215 | u16 index; /* index in c.p. array in that sector*/ | 215 | __le16 index; /* index in c.p. array in that sector*/ |
216 | u16 unknown; /* some unknown value; usually 0; | 216 | __le16 unknown; /* some unknown value; usually 0; |
217 | 2 in Japanese version */ | 217 | 2 in Japanese version */ |
218 | } array[31]; /* unknown length */ | 218 | } array[31]; /* unknown length */ |
219 | }; | 219 | }; |
@@ -224,19 +224,19 @@ struct code_page_directory | |||
224 | 224 | ||
225 | struct code_page_data | 225 | struct code_page_data |
226 | { | 226 | { |
227 | u32 magic; /* 8945 21f7 */ | 227 | __le32 magic; /* 8945 21f7 */ |
228 | u32 n_used; /* # elements used in c_p_data[] */ | 228 | __le32 n_used; /* # elements used in c_p_data[] */ |
229 | u32 bounds[3]; /* looks a bit like | 229 | __le32 bounds[3]; /* looks a bit like |
230 | (beg1,end1), (beg2,end2) | 230 | (beg1,end1), (beg2,end2) |
231 | one byte each */ | 231 | one byte each */ |
232 | u16 offs[3]; /* offsets from start of sector | 232 | __le16 offs[3]; /* offsets from start of sector |
233 | to start of c_p_data[ix] */ | 233 | to start of c_p_data[ix] */ |
234 | struct { | 234 | struct { |
235 | u16 ix; /* index */ | 235 | __le16 ix; /* index */ |
236 | u16 code_page_number; /* code page number */ | 236 | __le16 code_page_number; /* code page number */ |
237 | u16 unknown; /* the same as in cp directory */ | 237 | __le16 unknown; /* the same as in cp directory */ |
238 | u8 map[128]; /* upcase table for chars 80..ff */ | 238 | u8 map[128]; /* upcase table for chars 80..ff */ |
239 | u16 zero2; | 239 | __le16 zero2; |
240 | } code_page[3]; | 240 | } code_page[3]; |
241 | u8 incognita[78]; | 241 | u8 incognita[78]; |
242 | }; | 242 | }; |