diff options
author | Karel Zak | 2009-10-16 02:34:28 +0200 |
---|---|---|
committer | Karel Zak | 2009-10-16 02:34:28 +0200 |
commit | 11854e2eff8b15411bbbc35c95dc77d6a722cc6b (patch) | |
tree | 723a35834ce281bbea4c867088dc774467368867 /shlibs/blkid/src/superblocks/udf.c | |
parent | include: use c.h in canonicalize.h (diff) | |
download | kernel-qcow2-util-linux-11854e2eff8b15411bbbc35c95dc77d6a722cc6b.tar.gz kernel-qcow2-util-linux-11854e2eff8b15411bbbc35c95dc77d6a722cc6b.tar.xz kernel-qcow2-util-linux-11854e2eff8b15411bbbc35c95dc77d6a722cc6b.zip |
libblkid: add missing packed attributes
This patch add __attribute__((packed)) to almost all superblock and
disk label definitions. Well, in many cases this is not necessary, but
it's a cheap way how to keep the code robust...
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/blkid/src/superblocks/udf.c')
-rw-r--r-- | shlibs/blkid/src/superblocks/udf.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/shlibs/blkid/src/superblocks/udf.c b/shlibs/blkid/src/superblocks/udf.c index 3b972ee90..55c96adb3 100644 --- a/shlibs/blkid/src/superblocks/udf.c +++ b/shlibs/blkid/src/superblocks/udf.c @@ -28,28 +28,32 @@ struct volume_descriptor { 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 |