mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-30 23:21:08 +03:00
volume_id: replace __packed__ by PACKED macro
This commit is contained in:
parent
5597760367
commit
467546b586
@ -38,9 +38,9 @@ struct cramfs_super {
|
|||||||
uint32_t edition;
|
uint32_t edition;
|
||||||
uint32_t blocks;
|
uint32_t blocks;
|
||||||
uint32_t files;
|
uint32_t files;
|
||||||
} __attribute__((__packed__)) info;
|
} PACKED info;
|
||||||
uint8_t name[16];
|
uint8_t name[16];
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
int volume_id_probe_cramfs(struct volume_id *id, uint64_t off)
|
int volume_id_probe_cramfs(struct volume_id *id, uint64_t off)
|
||||||
{
|
{
|
||||||
|
@ -61,7 +61,7 @@ struct ext2_super_block {
|
|||||||
uint32_t s_feature_ro_compat;
|
uint32_t s_feature_ro_compat;
|
||||||
uint8_t s_uuid[16];
|
uint8_t s_uuid[16];
|
||||||
uint8_t s_volume_name[16];
|
uint8_t s_volume_name[16];
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
#define EXT_SUPER_MAGIC 0xEF53
|
#define EXT_SUPER_MAGIC 0xEF53
|
||||||
#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x00000004
|
#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x00000004
|
||||||
|
@ -58,7 +58,7 @@ struct vfat_super_block {
|
|||||||
uint8_t magic[8];
|
uint8_t magic[8];
|
||||||
uint8_t dummy2[192];
|
uint8_t dummy2[192];
|
||||||
uint8_t pmagic[2];
|
uint8_t pmagic[2];
|
||||||
} __attribute__((__packed__)) fat;
|
} PACKED fat;
|
||||||
struct fat32_super_block {
|
struct fat32_super_block {
|
||||||
uint32_t fat32_length;
|
uint32_t fat32_length;
|
||||||
uint16_t flags;
|
uint16_t flags;
|
||||||
@ -73,9 +73,9 @@ struct vfat_super_block {
|
|||||||
uint8_t magic[8];
|
uint8_t magic[8];
|
||||||
uint8_t dummy2[164];
|
uint8_t dummy2[164];
|
||||||
uint8_t pmagic[2];
|
uint8_t pmagic[2];
|
||||||
} __attribute__((__packed__)) fat32;
|
} PACKED fat32;
|
||||||
} __attribute__((__packed__)) type;
|
} PACKED type;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
struct vfat_dir_entry {
|
struct vfat_dir_entry {
|
||||||
uint8_t name[11];
|
uint8_t name[11];
|
||||||
@ -89,7 +89,7 @@ struct vfat_dir_entry {
|
|||||||
uint16_t date_write;
|
uint16_t date_write;
|
||||||
uint16_t cluster_low;
|
uint16_t cluster_low;
|
||||||
uint32_t size;
|
uint32_t size;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
static uint8_t *get_attr_volume_id(struct vfat_dir_entry *dir, unsigned int count)
|
static uint8_t *get_attr_volume_id(struct vfat_dir_entry *dir, unsigned int count)
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,7 @@ struct hfs_finder_info{
|
|||||||
uint32_t reserved;
|
uint32_t reserved;
|
||||||
uint32_t osx_folder;
|
uint32_t osx_folder;
|
||||||
uint8_t id[8];
|
uint8_t id[8];
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
struct hfs_mdb {
|
struct hfs_mdb {
|
||||||
uint8_t signature[2];
|
uint8_t signature[2];
|
||||||
@ -65,7 +65,7 @@ struct hfs_mdb {
|
|||||||
uint8_t embed_sig[2];
|
uint8_t embed_sig[2];
|
||||||
uint16_t embed_startblock;
|
uint16_t embed_startblock;
|
||||||
uint16_t embed_blockcount;
|
uint16_t embed_blockcount;
|
||||||
} __attribute__((__packed__)) *hfs;
|
} PACKED *hfs;
|
||||||
|
|
||||||
struct hfsplus_bnode_descriptor {
|
struct hfsplus_bnode_descriptor {
|
||||||
uint32_t next;
|
uint32_t next;
|
||||||
@ -74,7 +74,7 @@ struct hfsplus_bnode_descriptor {
|
|||||||
uint8_t height;
|
uint8_t height;
|
||||||
uint16_t num_recs;
|
uint16_t num_recs;
|
||||||
uint16_t reserved;
|
uint16_t reserved;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
struct hfsplus_bheader_record {
|
struct hfsplus_bheader_record {
|
||||||
uint16_t depth;
|
uint16_t depth;
|
||||||
@ -83,19 +83,19 @@ struct hfsplus_bheader_record {
|
|||||||
uint32_t leaf_head;
|
uint32_t leaf_head;
|
||||||
uint32_t leaf_tail;
|
uint32_t leaf_tail;
|
||||||
uint16_t node_size;
|
uint16_t node_size;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
struct hfsplus_catalog_key {
|
struct hfsplus_catalog_key {
|
||||||
uint16_t key_len;
|
uint16_t key_len;
|
||||||
uint32_t parent_id;
|
uint32_t parent_id;
|
||||||
uint16_t unicode_len;
|
uint16_t unicode_len;
|
||||||
uint8_t unicode[255 * 2];
|
uint8_t unicode[255 * 2];
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
struct hfsplus_extent {
|
struct hfsplus_extent {
|
||||||
uint32_t start_block;
|
uint32_t start_block;
|
||||||
uint32_t block_count;
|
uint32_t block_count;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
#define HFSPLUS_EXTENT_COUNT 8
|
#define HFSPLUS_EXTENT_COUNT 8
|
||||||
struct hfsplus_fork {
|
struct hfsplus_fork {
|
||||||
@ -103,7 +103,7 @@ struct hfsplus_fork {
|
|||||||
uint32_t clump_size;
|
uint32_t clump_size;
|
||||||
uint32_t total_blocks;
|
uint32_t total_blocks;
|
||||||
struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT];
|
struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT];
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
struct hfsplus_vol_header {
|
struct hfsplus_vol_header {
|
||||||
uint8_t signature[2];
|
uint8_t signature[2];
|
||||||
@ -132,7 +132,7 @@ struct hfsplus_vol_header {
|
|||||||
struct hfsplus_fork cat_file;
|
struct hfsplus_fork cat_file;
|
||||||
struct hfsplus_fork attr_file;
|
struct hfsplus_fork attr_file;
|
||||||
struct hfsplus_fork start_file;
|
struct hfsplus_fork start_file;
|
||||||
} __attribute__((__packed__)) *hfsplus;
|
} PACKED *hfsplus;
|
||||||
|
|
||||||
#define HFS_SUPERBLOCK_OFFSET 0x400
|
#define HFS_SUPERBLOCK_OFFSET 0x400
|
||||||
#define HFS_NODE_LEAF 0xff
|
#define HFS_NODE_LEAF 0xff
|
||||||
|
@ -30,11 +30,11 @@
|
|||||||
struct hpt37x_meta {
|
struct hpt37x_meta {
|
||||||
uint8_t filler1[32];
|
uint8_t filler1[32];
|
||||||
uint32_t magic;
|
uint32_t magic;
|
||||||
} __attribute__((packed));
|
} PACKED;
|
||||||
|
|
||||||
struct hpt45x_meta {
|
struct hpt45x_meta {
|
||||||
uint32_t magic;
|
uint32_t magic;
|
||||||
} __attribute__((packed));
|
} PACKED;
|
||||||
|
|
||||||
#define HPT37X_CONFIG_OFF 0x1200
|
#define HPT37X_CONFIG_OFF 0x1200
|
||||||
#define HPT37X_MAGIC_OK 0x5a7816f0
|
#define HPT37X_MAGIC_OK 0x5a7816f0
|
||||||
|
@ -31,7 +31,7 @@ struct hpfs_super
|
|||||||
{
|
{
|
||||||
uint8_t magic[4];
|
uint8_t magic[4];
|
||||||
uint8_t version;
|
uint8_t version;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
#define HPFS_SUPERBLOCK_OFFSET 0x2000
|
#define HPFS_SUPERBLOCK_OFFSET 0x2000
|
||||||
|
|
||||||
|
@ -45,14 +45,14 @@ struct iso_volume_descriptor {
|
|||||||
uint8_t unused[8];
|
uint8_t unused[8];
|
||||||
uint8_t space_size[8];
|
uint8_t space_size[8];
|
||||||
uint8_t escape_sequences[8];
|
uint8_t escape_sequences[8];
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
struct high_sierra_volume_descriptor {
|
struct high_sierra_volume_descriptor {
|
||||||
uint8_t foo[8];
|
uint8_t foo[8];
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
uint8_t id[4];
|
uint8_t id[4];
|
||||||
uint8_t version;
|
uint8_t version;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
int volume_id_probe_iso9660(struct volume_id *id, uint64_t off)
|
int volume_id_probe_iso9660(struct volume_id *id, uint64_t off)
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,7 @@ struct isw_meta {
|
|||||||
uint32_t mpb_size;
|
uint32_t mpb_size;
|
||||||
uint32_t family_num;
|
uint32_t family_num;
|
||||||
uint32_t generation_num;
|
uint32_t generation_num;
|
||||||
} __attribute__((packed));
|
} PACKED;
|
||||||
|
|
||||||
#define ISW_SIGNATURE "Intel Raid ISM Cfg Sig. "
|
#define ISW_SIGNATURE "Intel Raid ISM Cfg Sig. "
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ struct jfs_super_block {
|
|||||||
uint8_t uuid[16];
|
uint8_t uuid[16];
|
||||||
uint8_t label[16];
|
uint8_t label[16];
|
||||||
uint8_t loguuid[16];
|
uint8_t loguuid[16];
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
#define JFS_SUPERBLOCK_OFFSET 0x8000
|
#define JFS_SUPERBLOCK_OFFSET 0x8000
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ struct mdp_super_block {
|
|||||||
uint32_t set_uuid1;
|
uint32_t set_uuid1;
|
||||||
uint32_t set_uuid2;
|
uint32_t set_uuid2;
|
||||||
uint32_t set_uuid3;
|
uint32_t set_uuid3;
|
||||||
} __attribute__((packed)) *mdp;
|
} PACKED *mdp;
|
||||||
|
|
||||||
#define MD_RESERVED_BYTES 0x10000
|
#define MD_RESERVED_BYTES 0x10000
|
||||||
#define MD_MAGIC 0xa92b4efc
|
#define MD_MAGIC 0xa92b4efc
|
||||||
|
@ -34,7 +34,7 @@ struct swap_header_v1_2 {
|
|||||||
uint32_t nr_badpages;
|
uint32_t nr_badpages;
|
||||||
uint8_t uuid[16];
|
uint8_t uuid[16];
|
||||||
uint8_t volume_name[16];
|
uint8_t volume_name[16];
|
||||||
} __attribute__((__packed__)) *sw;
|
} PACKED *sw;
|
||||||
|
|
||||||
#define LARGEST_PAGESIZE 0x4000
|
#define LARGEST_PAGESIZE 0x4000
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
struct lsi_meta {
|
struct lsi_meta {
|
||||||
uint8_t sig[6];
|
uint8_t sig[6];
|
||||||
} __attribute__((packed));
|
} PACKED;
|
||||||
|
|
||||||
#define LSI_SIGNATURE "$XIDE$"
|
#define LSI_SIGNATURE "$XIDE$"
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
struct lvm1_super_block {
|
struct lvm1_super_block {
|
||||||
uint8_t id[2];
|
uint8_t id[2];
|
||||||
} __attribute__((packed));
|
} PACKED;
|
||||||
|
|
||||||
struct lvm2_super_block {
|
struct lvm2_super_block {
|
||||||
uint8_t id[8];
|
uint8_t id[8];
|
||||||
@ -37,7 +37,7 @@ struct lvm2_super_block {
|
|||||||
uint32_t crc_xl;
|
uint32_t crc_xl;
|
||||||
uint32_t offset_xl;
|
uint32_t offset_xl;
|
||||||
uint8_t type[8];
|
uint8_t type[8];
|
||||||
} __attribute__((packed));
|
} PACKED;
|
||||||
|
|
||||||
#define LVM1_SB_OFF 0x400
|
#define LVM1_SB_OFF 0x400
|
||||||
#define LVM1_MAGIC "HM"
|
#define LVM1_MAGIC "HM"
|
||||||
|
@ -31,7 +31,7 @@ struct mac_driver_desc {
|
|||||||
uint8_t signature[2];
|
uint8_t signature[2];
|
||||||
uint16_t block_size;
|
uint16_t block_size;
|
||||||
uint32_t block_count;
|
uint32_t block_count;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
struct mac_partition {
|
struct mac_partition {
|
||||||
uint8_t signature[2];
|
uint8_t signature[2];
|
||||||
@ -41,7 +41,7 @@ struct mac_partition {
|
|||||||
uint32_t block_count;
|
uint32_t block_count;
|
||||||
uint8_t name[32];
|
uint8_t name[32];
|
||||||
uint8_t type[32];
|
uint8_t type[32];
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
int volume_id_probe_mac_partition_map(struct volume_id *id, uint64_t off)
|
int volume_id_probe_mac_partition_map(struct volume_id *id, uint64_t off)
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@ struct minix_super_block
|
|||||||
uint16_t s_magic;
|
uint16_t s_magic;
|
||||||
uint16_t s_state;
|
uint16_t s_state;
|
||||||
uint32_t s_zones;
|
uint32_t s_zones;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
#define MINIX_SUPERBLOCK_OFFSET 0x400
|
#define MINIX_SUPERBLOCK_OFFSET 0x400
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ struct msdos_partition_entry {
|
|||||||
uint8_t end_cyl;
|
uint8_t end_cyl;
|
||||||
uint32_t start_sect;
|
uint32_t start_sect;
|
||||||
uint32_t nr_sects;
|
uint32_t nr_sects;
|
||||||
} __attribute__((packed));
|
} PACKED;
|
||||||
|
|
||||||
#define MSDOS_MAGIC "\x55\xaa"
|
#define MSDOS_MAGIC "\x55\xaa"
|
||||||
#define MSDOS_PARTTABLE_OFFSET 0x1be
|
#define MSDOS_PARTTABLE_OFFSET 0x1be
|
||||||
|
@ -52,7 +52,7 @@ struct ntfs_super_block {
|
|||||||
uint8_t reserved2[3];
|
uint8_t reserved2[3];
|
||||||
uint8_t volume_serial[8];
|
uint8_t volume_serial[8];
|
||||||
uint16_t checksum;
|
uint16_t checksum;
|
||||||
} __attribute__((__packed__)) *ns;
|
} PACKED *ns;
|
||||||
|
|
||||||
struct master_file_table_record {
|
struct master_file_table_record {
|
||||||
uint8_t magic[4];
|
uint8_t magic[4];
|
||||||
@ -65,7 +65,7 @@ struct master_file_table_record {
|
|||||||
uint16_t flags;
|
uint16_t flags;
|
||||||
uint32_t bytes_in_use;
|
uint32_t bytes_in_use;
|
||||||
uint32_t bytes_allocated;
|
uint32_t bytes_allocated;
|
||||||
} __attribute__((__packed__)) *mftr;
|
} PACKED *mftr;
|
||||||
|
|
||||||
struct file_attribute {
|
struct file_attribute {
|
||||||
uint32_t type;
|
uint32_t type;
|
||||||
@ -77,13 +77,13 @@ struct file_attribute {
|
|||||||
uint16_t instance;
|
uint16_t instance;
|
||||||
uint32_t value_len;
|
uint32_t value_len;
|
||||||
uint16_t value_offset;
|
uint16_t value_offset;
|
||||||
} __attribute__((__packed__)) *attr;
|
} PACKED *attr;
|
||||||
|
|
||||||
struct volume_info {
|
struct volume_info {
|
||||||
uint64_t reserved;
|
uint64_t reserved;
|
||||||
uint8_t major_ver;
|
uint8_t major_ver;
|
||||||
uint8_t minor_ver;
|
uint8_t minor_ver;
|
||||||
} __attribute__((__packed__)) *info;
|
} PACKED *info;
|
||||||
|
|
||||||
#define MFT_RECORD_VOLUME 3
|
#define MFT_RECORD_VOLUME 3
|
||||||
#define MFT_RECORD_ATTR_VOLUME_NAME 0x60
|
#define MFT_RECORD_ATTR_VOLUME_NAME 0x60
|
||||||
|
@ -32,7 +32,7 @@ struct nvidia_meta {
|
|||||||
uint32_t size;
|
uint32_t size;
|
||||||
uint32_t chksum;
|
uint32_t chksum;
|
||||||
uint16_t version;
|
uint16_t version;
|
||||||
} __attribute__((packed));
|
} PACKED;
|
||||||
|
|
||||||
#define NVIDIA_SIGNATURE "NVIDIA"
|
#define NVIDIA_SIGNATURE "NVIDIA"
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ struct ocfs1_super_block_header {
|
|||||||
uint64_t new_cfg_off;
|
uint64_t new_cfg_off;
|
||||||
uint32_t prot_bits;
|
uint32_t prot_bits;
|
||||||
int32_t excl_mount;
|
int32_t excl_mount;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
struct ocfs1_super_block_label {
|
struct ocfs1_super_block_label {
|
||||||
struct ocfs1_disk_lock {
|
struct ocfs1_disk_lock {
|
||||||
@ -69,14 +69,14 @@ struct ocfs1_super_block_label {
|
|||||||
uint32_t reader_node_num;
|
uint32_t reader_node_num;
|
||||||
uint64_t oin_node_map;
|
uint64_t oin_node_map;
|
||||||
uint64_t dlock_seq_num;
|
uint64_t dlock_seq_num;
|
||||||
} disk_lock __attribute__((__packed__));
|
} PACKED disk_lock;
|
||||||
uint8_t label[64];
|
uint8_t label[64];
|
||||||
uint16_t label_len;
|
uint16_t label_len;
|
||||||
uint8_t vol_id[16];
|
uint8_t vol_id[16];
|
||||||
uint16_t vol_id_len;
|
uint16_t vol_id_len;
|
||||||
uint8_t cluster_name[64];
|
uint8_t cluster_name[64];
|
||||||
uint16_t cluster_name_len;
|
uint16_t cluster_name_len;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
struct ocfs2_super_block {
|
struct ocfs2_super_block {
|
||||||
uint8_t i_signature[8];
|
uint8_t i_signature[8];
|
||||||
@ -125,7 +125,7 @@ struct ocfs2_super_block {
|
|||||||
uint64_t s_first_cluster_group;
|
uint64_t s_first_cluster_group;
|
||||||
uint8_t s_label[64];
|
uint8_t s_label[64];
|
||||||
uint8_t s_uuid[16];
|
uint8_t s_uuid[16];
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off)
|
int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off)
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
struct promise_meta {
|
struct promise_meta {
|
||||||
uint8_t sig[24];
|
uint8_t sig[24];
|
||||||
} __attribute__((packed));
|
} PACKED;
|
||||||
|
|
||||||
#define PDC_CONFIG_OFF 0x1200
|
#define PDC_CONFIG_OFF 0x1200
|
||||||
#define PDC_SIGNATURE "Promise Technology, Inc."
|
#define PDC_SIGNATURE "Promise Technology, Inc."
|
||||||
|
@ -42,7 +42,7 @@ struct reiserfs_super_block {
|
|||||||
uint32_t dummy4[5];
|
uint32_t dummy4[5];
|
||||||
uint8_t uuid[16];
|
uint8_t uuid[16];
|
||||||
uint8_t label[16];
|
uint8_t label[16];
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
struct reiser4_super_block {
|
struct reiser4_super_block {
|
||||||
uint8_t magic[16];
|
uint8_t magic[16];
|
||||||
@ -50,7 +50,7 @@ struct reiser4_super_block {
|
|||||||
uint8_t uuid[16];
|
uint8_t uuid[16];
|
||||||
uint8_t label[16];
|
uint8_t label[16];
|
||||||
uint64_t dummy2;
|
uint64_t dummy2;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
#define REISERFS1_SUPERBLOCK_OFFSET 0x2000
|
#define REISERFS1_SUPERBLOCK_OFFSET 0x2000
|
||||||
#define REISERFS_SUPERBLOCK_OFFSET 0x10000
|
#define REISERFS_SUPERBLOCK_OFFSET 0x10000
|
||||||
|
@ -32,7 +32,7 @@ struct romfs_super {
|
|||||||
uint32_t size;
|
uint32_t size;
|
||||||
uint32_t checksum;
|
uint32_t checksum;
|
||||||
uint8_t name[0];
|
uint8_t name[0];
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
int volume_id_probe_romfs(struct volume_id *id, uint64_t off)
|
int volume_id_probe_romfs(struct volume_id *id, uint64_t off)
|
||||||
{
|
{
|
||||||
|
@ -44,7 +44,7 @@ struct silicon_meta {
|
|||||||
uint16_t vendor_id;
|
uint16_t vendor_id;
|
||||||
uint16_t minor_ver;
|
uint16_t minor_ver;
|
||||||
uint16_t major_ver;
|
uint16_t major_ver;
|
||||||
} __attribute__((packed));
|
} PACKED;
|
||||||
|
|
||||||
#define SILICON_MAGIC 0x2F000000
|
#define SILICON_MAGIC 0x2F000000
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ struct sysv_super
|
|||||||
uint32_t s_state;
|
uint32_t s_state;
|
||||||
uint32_t s_magic;
|
uint32_t s_magic;
|
||||||
uint32_t s_type;
|
uint32_t s_type;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
#define XENIX_NICINOD 100
|
#define XENIX_NICINOD 100
|
||||||
#define XENIX_NICFREE 100
|
#define XENIX_NICFREE 100
|
||||||
@ -82,7 +82,7 @@ struct xenix_super {
|
|||||||
uint8_t s_fill[371];
|
uint8_t s_fill[371];
|
||||||
uint32_t s_magic;
|
uint32_t s_magic;
|
||||||
uint32_t s_type;
|
uint32_t s_type;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
#define SYSV_SUPERBLOCK_BLOCK 0x01
|
#define SYSV_SUPERBLOCK_BLOCK 0x01
|
||||||
#define SYSV_MAGIC 0xfd187e20
|
#define SYSV_MAGIC 0xfd187e20
|
||||||
|
@ -37,28 +37,28 @@ struct volume_descriptor {
|
|||||||
uint16_t crc;
|
uint16_t crc;
|
||||||
uint16_t crc_len;
|
uint16_t crc_len;
|
||||||
uint32_t location;
|
uint32_t location;
|
||||||
} __attribute__((__packed__)) tag;
|
} PACKED tag;
|
||||||
union {
|
union {
|
||||||
struct anchor_descriptor {
|
struct anchor_descriptor {
|
||||||
uint32_t length;
|
uint32_t length;
|
||||||
uint32_t location;
|
uint32_t location;
|
||||||
} __attribute__((__packed__)) anchor;
|
} PACKED anchor;
|
||||||
struct primary_descriptor {
|
struct primary_descriptor {
|
||||||
uint32_t seq_num;
|
uint32_t seq_num;
|
||||||
uint32_t desc_num;
|
uint32_t desc_num;
|
||||||
struct dstring {
|
struct dstring {
|
||||||
uint8_t clen;
|
uint8_t clen;
|
||||||
uint8_t c[31];
|
uint8_t c[31];
|
||||||
} __attribute__((__packed__)) ident;
|
} PACKED ident;
|
||||||
} __attribute__((__packed__)) primary;
|
} PACKED primary;
|
||||||
} __attribute__((__packed__)) type;
|
} PACKED type;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
struct volume_structure_descriptor {
|
struct volume_structure_descriptor {
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
uint8_t id[5];
|
uint8_t id[5];
|
||||||
uint8_t version;
|
uint8_t version;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
#define UDF_VSD_OFFSET 0x8000
|
#define UDF_VSD_OFFSET 0x8000
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ struct ufs_super_block {
|
|||||||
uint32_t cs_nbfree;
|
uint32_t cs_nbfree;
|
||||||
uint32_t cs_nifree;
|
uint32_t cs_nifree;
|
||||||
uint32_t cs_nffree;
|
uint32_t cs_nffree;
|
||||||
} __attribute__((__packed__)) fs_cstotal;
|
} PACKED fs_cstotal;
|
||||||
int8_t fs_fmod;
|
int8_t fs_fmod;
|
||||||
int8_t fs_clean;
|
int8_t fs_clean;
|
||||||
int8_t fs_ronly;
|
int8_t fs_ronly;
|
||||||
@ -93,7 +93,7 @@ struct ufs_super_block {
|
|||||||
uint32_t fs_maxcluster;
|
uint32_t fs_maxcluster;
|
||||||
uint32_t fs_cpc;
|
uint32_t fs_cpc;
|
||||||
uint16_t fs_opostbl[16][8];
|
uint16_t fs_opostbl[16][8];
|
||||||
} __attribute__((__packed__)) fs_u1;
|
} PACKED fs_u1;
|
||||||
struct {
|
struct {
|
||||||
int8_t fs_fsmnt[468];
|
int8_t fs_fsmnt[468];
|
||||||
uint8_t fs_volname[32];
|
uint8_t fs_volname[32];
|
||||||
@ -116,17 +116,17 @@ struct ufs_super_block {
|
|||||||
uint64_t cs_nffree;
|
uint64_t cs_nffree;
|
||||||
uint64_t cs_numclusters;
|
uint64_t cs_numclusters;
|
||||||
uint64_t cs_spare[3];
|
uint64_t cs_spare[3];
|
||||||
} __attribute__((__packed__)) fs_cstotal;
|
} PACKED fs_cstotal;
|
||||||
struct ufs_timeval {
|
struct ufs_timeval {
|
||||||
int32_t tv_sec;
|
int32_t tv_sec;
|
||||||
int32_t tv_usec;
|
int32_t tv_usec;
|
||||||
} __attribute__((__packed__)) fs_time;
|
} PACKED fs_time;
|
||||||
int64_t fs_size;
|
int64_t fs_size;
|
||||||
int64_t fs_dsize;
|
int64_t fs_dsize;
|
||||||
uint64_t fs_csaddr;
|
uint64_t fs_csaddr;
|
||||||
int64_t fs_pendingblocks;
|
int64_t fs_pendingblocks;
|
||||||
int32_t fs_pendinginodes;
|
int32_t fs_pendinginodes;
|
||||||
} __attribute__((__packed__)) fs_u2;
|
} PACKED fs_u2;
|
||||||
} fs_u11;
|
} fs_u11;
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@ -136,7 +136,7 @@ struct ufs_super_block {
|
|||||||
int32_t fs_state;
|
int32_t fs_state;
|
||||||
uint32_t fs_qbmask[2];
|
uint32_t fs_qbmask[2];
|
||||||
uint32_t fs_qfmask[2];
|
uint32_t fs_qfmask[2];
|
||||||
} __attribute__((__packed__)) fs_sun;
|
} PACKED fs_sun;
|
||||||
struct {
|
struct {
|
||||||
int32_t fs_sparecon[53];
|
int32_t fs_sparecon[53];
|
||||||
int32_t fs_reclaim;
|
int32_t fs_reclaim;
|
||||||
@ -144,7 +144,7 @@ struct ufs_super_block {
|
|||||||
uint32_t fs_npsect;
|
uint32_t fs_npsect;
|
||||||
uint32_t fs_qbmask[2];
|
uint32_t fs_qbmask[2];
|
||||||
uint32_t fs_qfmask[2];
|
uint32_t fs_qfmask[2];
|
||||||
} __attribute__((__packed__)) fs_sunx86;
|
} PACKED fs_sunx86;
|
||||||
struct {
|
struct {
|
||||||
int32_t fs_sparecon[50];
|
int32_t fs_sparecon[50];
|
||||||
int32_t fs_contigsumsize;
|
int32_t fs_contigsumsize;
|
||||||
@ -154,7 +154,7 @@ struct ufs_super_block {
|
|||||||
uint32_t fs_qbmask[2];
|
uint32_t fs_qbmask[2];
|
||||||
uint32_t fs_qfmask[2];
|
uint32_t fs_qfmask[2];
|
||||||
int32_t fs_state;
|
int32_t fs_state;
|
||||||
} __attribute__((__packed__)) fs_44;
|
} PACKED fs_44;
|
||||||
} fs_u2;
|
} fs_u2;
|
||||||
int32_t fs_postblformat;
|
int32_t fs_postblformat;
|
||||||
int32_t fs_nrpos;
|
int32_t fs_nrpos;
|
||||||
@ -162,7 +162,7 @@ struct ufs_super_block {
|
|||||||
int32_t fs_rotbloff;
|
int32_t fs_rotbloff;
|
||||||
uint32_t fs_magic;
|
uint32_t fs_magic;
|
||||||
uint8_t fs_space[1];
|
uint8_t fs_space[1];
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
#define UFS_MAGIC 0x00011954
|
#define UFS_MAGIC 0x00011954
|
||||||
#define UFS2_MAGIC 0x19540119
|
#define UFS2_MAGIC 0x19540119
|
||||||
|
@ -36,10 +36,10 @@ struct via_meta {
|
|||||||
uint32_t capacity_low;
|
uint32_t capacity_low;
|
||||||
uint32_t capacity_high;
|
uint32_t capacity_high;
|
||||||
uint32_t serial_checksum;
|
uint32_t serial_checksum;
|
||||||
} __attribute((packed)) array;
|
} PACKED array;
|
||||||
uint32_t serial_checksum[8];
|
uint32_t serial_checksum[8];
|
||||||
uint8_t checksum;
|
uint8_t checksum;
|
||||||
} __attribute__((packed));
|
} PACKED;
|
||||||
|
|
||||||
#define VIA_SIGNATURE 0xAA55
|
#define VIA_SIGNATURE 0xAA55
|
||||||
|
|
||||||
|
@ -16,6 +16,10 @@
|
|||||||
|
|
||||||
#define VOLUME_ID_VERSION 56
|
#define VOLUME_ID_VERSION 56
|
||||||
|
|
||||||
|
#ifndef PACKED
|
||||||
|
#define PACKED __attribute__((packed))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define VOLUME_ID_LABEL_SIZE 64
|
#define VOLUME_ID_LABEL_SIZE 64
|
||||||
#define VOLUME_ID_UUID_SIZE 36
|
#define VOLUME_ID_UUID_SIZE 36
|
||||||
#define VOLUME_ID_FORMAT_SIZE 32
|
#define VOLUME_ID_FORMAT_SIZE 32
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
struct vxfs_super {
|
struct vxfs_super {
|
||||||
uint32_t vs_magic;
|
uint32_t vs_magic;
|
||||||
int32_t vs_version;
|
int32_t vs_version;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
int volume_id_probe_vxfs(struct volume_id *id, uint64_t off)
|
int volume_id_probe_vxfs(struct volume_id *id, uint64_t off)
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@ struct xfs_super_block {
|
|||||||
uint64_t icount;
|
uint64_t icount;
|
||||||
uint64_t ifree;
|
uint64_t ifree;
|
||||||
uint64_t fdblocks;
|
uint64_t fdblocks;
|
||||||
} __attribute__((__packed__));
|
} PACKED;
|
||||||
|
|
||||||
int volume_id_probe_xfs(struct volume_id *id, uint64_t off)
|
int volume_id_probe_xfs(struct volume_id *id, uint64_t off)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user