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:
Michal Lenc 2025-07-17 17:14:15 +02:00 committed by CeDeROM
parent beacf792fa
commit 8fbba09895

View file

@ -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)