Skip to content

Commit 8fbba09

Browse files
michallenccederom
authored andcommitted
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 <[email protected]>
1 parent beacf79 commit 8fbba09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

boot/nxboot/loader/boot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ static int copy_partition(int from, int where, struct nxboot_state *state,
164164
#ifdef CONFIG_NXBOOT_PRINTF_PROGRESS_PERCENT
165165
total_size = remain * 100;
166166
#endif
167-
blocksize = MAX(info_from.blocksize, info_where.blocksize);
167+
blocksize = info_where.blocksize;
168168

169169
buf = malloc(blocksize);
170170
if (!buf)

0 commit comments

Comments
 (0)