uint32_t raidtbl;
uint16_t raidline;
uint8_t res9[0xF6];
-};
+} __attribute__((packed));
#define AD_SIGNATURE "DPTM"
#define AD_MAGIC 0x37FC4D1E
uint32_t edition;
uint32_t blocks;
uint32_t files;
- } info;
+ } __attribute__((packed)) info;
uint8_t name[16];
-};
+} __attribute__((packed));
static int probe_cramfs(blkid_probe pr, const struct blkid_idmag *mag)
{
uint64_t s_mmp_block;
uint32_t s_raid_stripe_width;
uint32_t s_reserved[163];
-};
+} __attribute__((packed));
/* magic string */
#define EXT_SB_MAGIC "\123\357"
struct gfs2_inum __pad3; /* Was quota inode in gfs1 */
struct gfs2_inum __pad4; /* Was licence inode in gfs1 */
uint8_t sb_uuid[16]; /* The UUID maybe 0 for backwards compat */
-};
+} __attribute__((packed));
static int probe_gfs(blkid_probe pr, const struct blkid_idmag *mag)
{
uint8_t sig_hpfs[8];
uint8_t pad[448];
uint8_t magic[2];
-};
+} __attribute__((packed));
struct hpfs_super_block
{
uint8_t magic[4];
uint8_t magic1[4];
uint8_t version;
-};
+} __attribute__((packed));
struct hpfs_spare_super
{
uint8_t magic[4];
uint8_t magic1[4];
-};
+} __attribute__((packed));
#define HPFS_SB_OFFSET 0x2000
unsigned char unused[8];
unsigned char space_size[8];
unsigned char escape_sequences[8];
-};
+} __attribute__((packed));
#define ISO_SUPERBLOCK_OFFSET 0x8000
#define ISO_SECTOR_SIZE 0x800
unsigned char unused1;
unsigned char system_id[32];
unsigned char volume_id[32];
-};
+} __attribute__((packed));
/* returns 1 if the begin of @ascii is equal to @utf16 string.
*/
uint8_t mkDigestSalt[LUKS_SALTSIZE];
uint32_t mkDigestIterations;
uint8_t uuid[UUID_STRING_L];
-};
+} __attribute__((packed));
static int probe_luks(blkid_probe pr, const struct blkid_idmag *mag)
{
uint8_t reserved2[3];
uint64_t volume_serial;
uint16_t checksum;
-};
+} __attribute__((packed));
struct master_file_table_record {
uint32_t magic;
uint32_t size;
uint32_t chksum;
uint16_t version;
-};
+} __attribute__((packed));
#define NVIDIA_SIGNATURE "NVIDIA"
uint32_t rs_dummy4[5];
unsigned char rs_uuid[16];
char rs_label[16];
-};
+} __attribute__((packed));
struct reiser4_super_block {
unsigned char rs4_magic[16];
unsigned char rs4_uuid[16];
unsigned char rs4_label[16];
uint64_t rs4_dummy2;
-};
+} __attribute__((packed));
static int probe_reiser(blkid_probe pr, const struct blkid_idmag *mag)
{
unsigned char ros_magic[8];
uint32_t ros_dummy1[2];
unsigned char ros_volume[16];
-};
+} __attribute__((packed));
static int probe_romfs(blkid_probe pr, const struct blkid_idmag *mag)
{
uint16_t vendor_id;
uint16_t minor_ver;
uint16_t major_ver;
-};
+} __attribute__((packed));
#define SILICON_MAGIC 0x2F000000
uint32_t directory_table_start_2;
uint16_t s_major;
uint16_t s_minor;
-};
+} __attribute__((packed));
static int probe_squashfs(blkid_probe pr, const struct blkid_idmag *mag)
{
unsigned char volume[16];
uint32_t padding[117];
uint32_t badpages[1];
-};
+} __attribute__((packed));
#define PAGESIZE_MIN 0xff6 /* 4086 (arm, i386, ...) */
#define PAGESIZE_MAX 0xfff6 /* 65526 (ia64) */
uint8_t s_fill[371];
uint32_t s_magic;
uint32_t s_type;
-};
+} __attribute__((packed));
#define SYSV_NICINOD 100
uint16_t crc;
uint16_t crc_len;
uint32_t location;
- } tag;
+ } __attribute__((packed)) tag;
+
union {
struct anchor_descriptor {
uint32_t length;
uint32_t location;
- } anchor;
+ } __attribute__((packed)) anchor;
+
struct primary_descriptor {
uint32_t seq_num;
uint32_t desc_num;
struct dstring {
uint8_t clen;
uint8_t c[31];
- } ident;
- } primary;
- } type;
-};
+ } __attribute__((packed)) ident;
+ } __attribute__((packed)) primary;
+
+ } __attribute__((packed)) type;
+
+} __attribute__((packed));
struct volume_structure_descriptor {
uint8_t type;
uint8_t id[5];
uint8_t version;
-};
+} __attribute__((packed));
#define UDF_VSD_OFFSET 0x8000
uint64_t fs_csaddr;
int64_t fs_pendingblocks;
int32_t fs_pendinginodes;
- } fs_u2;
+ } __attribute__((packed)) fs_u2;
} fs_u11;
union {
struct {
int32_t fs_rotbloff;
uint32_t fs_magic;
uint8_t fs_space[1];
-};
+} __attribute__((packed));
#define UFS_MAGIC 0x00011954
#define UFS2_MAGIC 0x19540119
#define UFS_MAGIC_FEA 0x00195612
#define UFS_MAGIC_LFN 0x00095014
+#define UFS_MAGIC_SEC 0x00612195
+#define UFS_MAGIC_4GB 0x05231994
static int probe_ufs(blkid_probe pr, const struct blkid_idmag *mag)
{
int offsets[] = { 0, 8, 64, 256 };
- int mags[] = { UFS2_MAGIC, UFS_MAGIC, UFS_MAGIC_FEA, UFS_MAGIC_LFN };
+ int mags[] = {
+ UFS2_MAGIC, UFS_MAGIC, UFS_MAGIC_FEA, UFS_MAGIC_LFN,
+ UFS_MAGIC_SEC, UFS_MAGIC_4GB
+ };
int i;
uint32_t magic;
struct ufs_super_block *ufs;
/* 52*/ unsigned char vs_magic[8];
/* 5a*/ unsigned char vs_dummy2[164];
/*1fe*/ unsigned char vs_pmagic[2];
-};
+} __attribute__((packed));
/* Yucky misaligned values */
struct msdos_super_block {
/* 36*/ unsigned char ms_magic[8];
/* 3d*/ unsigned char ms_dummy2[192];
/*1fe*/ unsigned char ms_pmagic[2];
-};
+} __attribute__((packed));
struct vfat_dir_entry {
uint8_t name[11];
uint16_t date_write;
uint16_t cluster_low;
uint32_t size;
-};
+} __attribute__((packed));
struct fat32_fsinfo {
uint8_t signature1[4];
uint32_t free_clusters;
uint32_t next_cluster;
uint32_t reserved2[4];
-};
+} __attribute__((packed));
/* maximum number of clusters */
#define FAT12_MAX 0xFF4
uint32_t capacity_low;
uint32_t capacity_high;
uint32_t serial_checksum;
- } array;
+ } __attribute__((packed)) array;
uint32_t serial_checksum[8];
uint8_t checksum;
-};
+} __attribute__((packed));
#define VIA_SIGNATURE 0xAA55
uint64_t xs_icount;
uint64_t xs_ifree;
uint64_t xs_fdblocks;
-};
+} __attribute__((packed));
static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag)
{
uint64_t ub_guid_sum; /* sum of all vdev guids */
uint64_t ub_timestamp; /* UTC time of last sync */
/*blkptr_t ub_rootbp;*/ /* MOS objset_phys_t */
-};
+} __attribute__((packed));
static int probe_zfs(blkid_probe pr, const struct blkid_idmag *mag)
{