Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeongarmy
Copy link
Contributor

  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

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
@@ -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:
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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) {
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants