diff --git a/boot/nxboot/loader/boot.c b/boot/nxboot/loader/boot.c index 42f83a66e2e..f7a24c7cd34 100644 --- a/boot/nxboot/loader/boot.c +++ b/boot/nxboot/loader/boot.c @@ -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