summaryrefslogtreecommitdiffstats
path: root/common/state/state.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-07-15 13:11:20 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-07-22 12:44:22 +0200
commita435c13e8809a5f92496fcbae3a38b7609cad515 (patch)
tree309621e020199e174e43d1158d6fccdf02755418 /common/state/state.h
parentea0e077ed65a003e4d7a1e023aee38cbe2d14898 (diff)
downloadbarebox-a435c13e8809a5f92496fcbae3a38b7609cad515.tar.gz
barebox-a435c13e8809a5f92496fcbae3a38b7609cad515.tar.xz
state: Save on shutdown
The state framework is meant for storing persistent variables. To make the state more persistent automatically save it on shutdown. This is now the default behaviour, but can be disabled using a 'save_on_shutdown' variable attached to the state. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/state/state.h')
-rw-r--r--common/state/state.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/state/state.h b/common/state/state.h
index 7f9651abd8..32146ca1bb 100644
--- a/common/state/state.h
+++ b/common/state/state.h
@@ -100,6 +100,7 @@ struct state {
struct list_head variables; /* Sorted list of variables */
unsigned int dirty;
+ unsigned int save_on_shutdown;
struct state_backend backend;
};