diff mbox series

[4/9] CONFIG_SURICATTA_STATE_CHOICE_BOOTLOADER not checked for state

Message ID 20180906114041.21828-4-sbabic@denx.de
State Accepted
Headers show
Series [1/9] Use provided macro for exit() | expand

Commit Message

Stefano Babic Sept. 6, 2018, 11:40 a.m. UTC
state changes are written via the bootloader interface.
Because this was done more general as in the past,
it is not required a special handle if U-Boot is not chosen.

Dropping CONFIG_SURICATTA_STATE_CHOICE_BOOTLOADER corresponds
to select CONFIG_BOOTLOADER_NONE in the bootloader menu.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 suricatta/state.c | 31 -------------------------------
 1 file changed, 31 deletions(-)
diff mbox series

Patch

diff --git a/suricatta/state.c b/suricatta/state.c
index 935475b..36897b8 100644
--- a/suricatta/state.c
+++ b/suricatta/state.c
@@ -34,36 +34,6 @@  bool is_state_valid(update_state_t state) {
 	return true;
 }
 
-#ifndef CONFIG_SURICATTA_STATE_CHOICE_BOOTLOADER
-/*
- * This is just if the state is not stored persistently, that is
- * it does not survive after a reboot.
- * Save it in a variable and use setter / getter to retrieve it
- */
-static int suricatta_state = STATE_NOT_AVAILABLE;
-server_op_res_t save_state(char *key, update_state_t value)
-{
-	(void)key;
-	suricatta_state = value;
-	return SERVER_OK;
-}
-
-server_op_res_t read_state(char *key, update_state_t *value)
-{
-	(void)key;
-
-	*value =  suricatta_state;
-	return SERVER_OK;
-}
-
-server_op_res_t reset_state(char *key)
-{
-	(void)key;
-	suricatta_state = STATE_NOT_AVAILABLE;
-	return SERVER_OK;
-}
-#else
-
 server_op_res_t save_state(char *key, update_state_t value)
 {
 	int ret;
@@ -104,4 +74,3 @@  server_op_res_t reset_state(char *key)
 	ret = bootloader_env_unset(key);
 	return ret == 0 ? SERVER_OK : SERVER_EERR;
 }
-#endif