-
Notifications
You must be signed in to change notification settings - Fork 602
binary_manager: Support new APIs for partition swap #6706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
7d998d6
to
7e005a4
Compare
1. binary_manager_get_inactive_info_all : Get info of all registered binaries in inactive(non-running) partition 2. binary_manager_swap_partition : Update bootparam data to swap opposite partition if all valid binaries exist in opposite partition
7e005a4
to
3104542
Compare
@@ -59,6 +59,8 @@ binmgr_result_type_e binary_manager_set_request(binmgr_request_t *request_msg, i | |||
case BINMGR_SETBP: | |||
request_msg->data.type = *(uint8_t *)arg; | |||
break; | |||
case BINMGR_SWAPBP: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary? It looks that default
covers.
|
||
binmgr_result_type_e binary_manager_swap_partition(void) | ||
{ | ||
#ifndef CONFIG_USE_BP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about locating positive case first? Because n
could be missing at code checking.
@@ -125,6 +129,10 @@ enum binmgr_request_msg_type { | |||
#ifdef CONFIG_BINMGR_RECOVERY | |||
BINMGR_FAULT, | |||
#endif | |||
#ifdef CONFIG_USE_BP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In enum, I wanna remove conditionals.
Let's return INVALID or NOT SUPPORT when the related config is disabled.
#ifdef CONFIG_RESOURCE_FS | ||
/* Update bootparam if valid resource binary exists */ | ||
ret = binary_manager_check_resource_update(false); | ||
if (ret < 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we get failure at somewhere, kernel update or resource update or user update, can we know which gets failure?
binary_manager_get_inactive_info_all : Get info of all registered binaries in inactive(non-running) partition
binary_manager_swap_partition : Update bootparam data to swap opposite partition if all valid binaries exist in opposite partition