summaryrefslogtreecommitdiffstats
path: root/common/state/backend_bucket_direct.c
diff options
context:
space:
mode:
authorStefan Lengfeld <s.lengfeld@phytec.de>2016-11-02 08:54:27 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-11-03 07:19:13 +0100
commit88b67f8ee47cee555342111481c252a39a390e44 (patch)
treef0c7bfac4aae4889163af2c0bf22ba83c5b5cb82 /common/state/backend_bucket_direct.c
parent28d5eb1bbc8681de635d145fa1d0edccb1571e0d (diff)
downloadbarebox-88b67f8ee47cee555342111481c252a39a390e44.tar.gz
state: use packed attribute for on storage structs
These structs are used for on-storage data layouts. They should be not affected by different integer precisions and alignment optimizations of 32bit or 64bit machines. Using the architecture independent integer data types, like uint32_t, achieves the former, using the packed attribute the later. Signed-off-by: Stefan Lengfeld <s.lengfeld@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/state/backend_bucket_direct.c')
-rw-r--r--common/state/backend_bucket_direct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/state/backend_bucket_direct.c b/common/state/backend_bucket_direct.c
index 08892f0..5225433 100644
--- a/common/state/backend_bucket_direct.c
+++ b/common/state/backend_bucket_direct.c
@@ -32,7 +32,7 @@ struct state_backend_storage_bucket_direct {
struct device_d *dev;
};
-struct state_backend_storage_bucket_direct_meta {
+struct __attribute__((__packed__)) state_backend_storage_bucket_direct_meta {
uint32_t magic;
uint32_t written_length;
};