reiserfsprogs: annotate for endian safeness
By annotating structure members and other on-disk structures as little endian, we can catch bugs more easily. The code was already endian safe except for three minor spots: 1) The badblock list code was initializing its key in an endian-unsafe way. 2) Indirect block pointer sequence printing was treating cpu-order values as little endian. 3) reiserfsck was trying to do endian switching on the lost+found key, but it was before it was even initialized to anything, so we can just remove that completely. These issues were fixed as part of this commit. Signed-off-by: Jeff Mahoney <jeffm@suse.com>
This commit is contained in:
1 parent
767f7b85df
commit
81aeadf510
26 files changed
+241
-220
No files matched your search
+1
-1
@@ -540,7 +540,7 @@ void rebuild_sb(reiserfs_filsys_t *fs, char *filename, struct fsck_data *data)
|
||||
"generated (%U)\n", sb->s_uuid);
|
||||
}
|
||||
#endif
|
||||
if (sb->s_flags != 0 && sb->s_flags != 1) {
|
||||
if (sb->s_flags != 0 && sb->s_flags != cpu_to_le32(1)) {
|
||||
fsck_log
|
||||
("rebuild-sb: super block flags found (%u), zeroed\n",
|
||||
sb->s_flags);
|
||||
|
||||
Reference in new issue
Block a user