common: state: Add property to protect existing data
After an update to a newer barebox version with an enabled state
framework, existing data in storage memories could be overwritten.

Add a new property to check in front of every write task, if the meta
magic field only contains the magic number, zeros or ones.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 6377d27 commit 67c1c0853fa06bcbc1725e93b6ad9942e80a1e56
@Daniel Schultz Daniel Schultz authored on 12 Apr 2018
Sascha Hauer committed on 16 Apr 2018
Showing 5 changed files
View
Documentation/devicetree/bindings/barebox/barebox,state.rst
View
common/state/backend_bucket_circular.c
View
common/state/backend_bucket_direct.c
View
common/state/state.c
View
common/state/state.h