mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
boot/nxboot/loader/boot.c: copy partition with blocksize large writes
The previous logic MAX(info_from.blocksize, info_where.blocksize) was incorrect. The most effective access with by writing the entire size of the block, therefore just decide the size based on the target page size. Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This commit is contained in:
parent
beacf792fa
commit
8fbba09895
1 changed files with 1 additions and 1 deletions
|
|
@ -164,7 +164,7 @@ static int copy_partition(int from, int where, struct nxboot_state *state,
|
|||
#ifdef CONFIG_NXBOOT_PRINTF_PROGRESS_PERCENT
|
||||
total_size = remain * 100;
|
||||
#endif
|
||||
blocksize = MAX(info_from.blocksize, info_where.blocksize);
|
||||
blocksize = info_where.blocksize;
|
||||
|
||||
buf = malloc(blocksize);
|
||||
if (!buf)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue