summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-06-03 16:34:10 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-06-03 16:34:13 +0200
commitdbabfd7440e8730852820f0bcc1892977af23747 (patch)
tree5e6f498b9ee35483842d9dfca4a5cefc53ed3758
parent53df62ae2fe30b4fb05124087ec4dcab3312e80c (diff)
downloaddt-utils-dbabfd7440e8730852820f0bcc1892977af23747.tar.gz
dt-utils-dbabfd7440e8730852820f0bcc1892977af23747.tar.xz
state: always store state when --init is givenv2014.06.0
When asked to initialize the state with the --init option actually store the state, even when no variable is modified. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--src/state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/state.c b/src/state.c
index 6df0cdd..75af097 100644
--- a/src/state.c
+++ b/src/state.c
@@ -1305,7 +1305,7 @@ int main(int argc, char *argv[])
}
}
- if (state->dirty) {
+ if (do_initialize || state->dirty) {
ret = state_save(state);
if (ret) {
fprintf(stderr, "Failed to save state: %s\n", strerror(-ret));