This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 8fbba09895a9d47962c076e81431af94889b39d6
Author: Michal Lenc <michall...@seznam.cz>
AuthorDate: Thu Jul 17 17:14:15 2025 +0200

    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 <michall...@seznam.cz>
---
 boot/nxboot/loader/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boot/nxboot/loader/boot.c b/boot/nxboot/loader/boot.c
index 9364ba16f..42f83a66e 100644
--- a/boot/nxboot/loader/boot.c
+++ b/boot/nxboot/loader/boot.c
@@ -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)

Reply via email to