Skip to content

nxboot/loader: Fix boot progress calculation. #3145

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions boot/nxboot/loader/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static int copy_partition(int from, int where, struct nxboot_state *state,
}

#ifdef CONFIG_NXBOOT_PRINTF_PROGRESS_PERCENT
total_size = remain * 100;
total_size = remain;
#endif
blocksize = info_where.blocksize;

Expand Down Expand Up @@ -227,7 +227,7 @@ static int copy_partition(int from, int where, struct nxboot_state *state,
{
#ifdef CONFIG_NXBOOT_PRINTF_PROGRESS_PERCENT
nxboot_progress(nxboot_progress_percent,
((total_size - remain) * 100) / total_size);
100 - ((100 * remain) / total_size));
#else
nxboot_progress(nxboot_progress_dot);
#endif
Expand Down
Loading