Fill in some padding in the disc record structure, and add GCC packed and aligned attributes to ensure that it is correctly laid out.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -29,17 +29,17 @@ struct adfs_discrecord { · 28 unmodified lines | ||
| 29 | 29 | __u8 log2sharesize:4; |
| 30 | 30 | __u8 unused40:4; |
| 31 | 31 | __u8 big_flag:1; |
| 32 | − __u8 unused41:1; | |
| 32 | + __u8 unused41:7; | |
| 33 | 33 | __u8 nzones_high; |
| 34 | + __u8 reserved43; | |
| 34 | 35 | __le32 format_version; |
| 35 | 36 | __le32 root_size; |
| 36 | 37 | __u8 unused52[60 - 52]; |
| 37 | −}; | |
| 38 | +} __attribute__((packed, aligned(4))); | |
| 38 | 39 | |
| 39 | 40 | #define ADFS_DISCRECORD (0xc00) |
| 40 | 41 | #define ADFS_DR_OFFSET (0x1c0) |
| 41 | 42 | #define ADFS_DR_SIZE 60 |
| 42 | 43 | #define ADFS_DR_SIZE_BITS (ADFS_DR_SIZE << 3) |
| 43 | 44 | |
| 44 | − | |
| 45 | 45 | #endif /* _UAPI_ADFS_FS_H */ |