summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangYoun Kwak <sy.kwak@samsung.com>2024-06-13 16:00:05 +0900
committerSangYoun Kwak <sy.kwak@samsung.com>2024-06-13 16:00:05 +0900
commit49ae623befcde620e8a3060d2d2716274afab03b (patch)
treeeae45b05bc2ab258243379ca6991b4f978b2d1bc
parent3ff4bdb09afad66bcd1d5f0a16423aac1511ba88 (diff)
downloaddevice-49ae623befcde620e8a3060d2d2716274afab03b.tar.gz
device-49ae623befcde620e8a3060d2d2716274afab03b.tar.bz2
device-49ae623befcde620e8a3060d2d2716274afab03b.zip
The simplified upgrade state model is used, the transition rule should be modified. Change-Id: I63cfa6e41eadbf40a7e3cc139838a3dcfeed2c95 Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
-rw-r--r--src/hal-api-device-board.c54
1 files changed, 1 insertions, 53 deletions
diff --git a/src/hal-api-device-board.c b/src/hal-api-device-board.c
index 30d0efe..00dac68 100644
--- a/src/hal-api-device-board.c
+++ b/src/hal-api-device-board.c
@@ -301,19 +301,12 @@ int hal_device_board_get_upgrade_progress_status(int *status)
#define UPGRADE_STATE_STANDBY "standby"
#define UPGRADE_STATE_READY "ready"
-#define UPGRADE_STATE_READY_FAILED "ready_failed"
-#define UPGRADE_STATE_RO_UPGRADING "ro_upgrading"
-#define UPGRADE_STATE_RO_FAILED "ro_failed"
-#define UPGRADE_STATE_RO_UPGRADED "ro_upgraded"
-#define UPGRADE_STATE_RW_UPGRADING "rw_upgrading"
-#define UPGRADE_STATE_RW_FAILED "rw_failed"
-#define UPGRADE_STATE_RW_UPGRADED "rw_upgraded"
#define UPGRADE_STATE_COMPLETED "completed"
struct upgrade_state {
char *state;
size_t next_size;
- char *next[3];
+ char *next[2];
};
static struct upgrade_state upgrade_states[] = {
@@ -327,52 +320,7 @@ static struct upgrade_state upgrade_states[] = {
.state = UPGRADE_STATE_READY,
.next_size = 2,
.next = {
- UPGRADE_STATE_READY_FAILED,
- UPGRADE_STATE_RO_UPGRADING,
- },
- }, {
- .state = UPGRADE_STATE_READY_FAILED,
- .next_size = 1,
- .next = {
UPGRADE_STATE_READY,
- },
- }, {
- .state = UPGRADE_STATE_RO_UPGRADING,
- .next_size = 2,
- .next = {
- UPGRADE_STATE_RO_FAILED,
- UPGRADE_STATE_RO_UPGRADED,
- },
- }, {
- .state = UPGRADE_STATE_RO_FAILED,
- .next_size = 1,
- .next = {
- UPGRADE_STATE_READY,
- },
- }, {
- .state = UPGRADE_STATE_RO_UPGRADED,
- .next_size = 1,
- .next = {
- UPGRADE_STATE_RW_UPGRADING,
- },
- }, {
- .state = UPGRADE_STATE_RW_UPGRADING,
- .next_size = 3,
- .next = {
- UPGRADE_STATE_RW_UPGRADING,
- UPGRADE_STATE_RW_FAILED,
- UPGRADE_STATE_RW_UPGRADED,
- },
- }, {
- .state = UPGRADE_STATE_RW_FAILED,
- .next_size = 1,
- .next = {
- UPGRADE_STATE_READY,
- },
- }, {
- .state = UPGRADE_STATE_RW_UPGRADED,
- .next_size = 1,
- .next = {
UPGRADE_STATE_COMPLETED,
},
}, {