mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-09 06:25:16 +00:00
nxboot/loader: Fix boot progress calculation.
This patch corrects a mathematical error in the progress reporting function which caused incorrect percentage progress calculations. Signed-off-by: Tim Hardisty <timh@jti.uk.com>
This commit is contained in:
parent
08fdbb03bb
commit
7506c026fa
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue