History

fs/adfs: correct disc record structure

Fill in some padding in the disc record structure, and add GCC packed and aligned attributes to ensure that it is correctly laid out.

Russell King committed 7 years ago

Commit 3ae762a1 parent d1fdb6d1 file · +3 −3Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/adfs_fs.h+3−3
@@ -29,17 +29,17 @@ struct adfs_discrecord { · 28 unmodified lines
2929 __u8 log2sharesize:4;
3030 __u8 unused40:4;
3131 __u8 big_flag:1;
32− __u8 unused41:1;
32+ __u8 unused41:7;
3333 __u8 nzones_high;
34+ __u8 reserved43;
3435 __le32 format_version;
3536 __le32 root_size;
3637 __u8 unused52[60 - 52];
37−};
38+} __attribute__((packed, aligned(4)));
3839
3940 #define ADFS_DISCRECORD (0xc00)
4041 #define ADFS_DR_OFFSET (0x1c0)
4142 #define ADFS_DR_SIZE 60
4243 #define ADFS_DR_SIZE_BITS (ADFS_DR_SIZE << 3)
4344
44−
4545 #endif /* _UAPI_ADFS_FS_H */