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 beacf792faade4e320f43acfe7560ae9079615b1
Author: Michal Lenc <michall...@seznam.cz>
AuthorDate: Thu Jul 17 17:12:27 2025 +0200

    boot/nxboot/loader/flash.c: open partition with O_DIRECT flag
    
    There is no need to use buffers in a bootloader. We expect a sequential
    access, therefore we just need to erase the erase page before writing
    to it for the first time, which is something FTL layer already takes
    care of.
    
    Signed-off-by: Michal Lenc <michall...@seznam.cz>
---
 boot/nxboot/loader/flash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boot/nxboot/loader/flash.c b/boot/nxboot/loader/flash.c
index fdbab4bb9..9142b25d9 100644
--- a/boot/nxboot/loader/flash.c
+++ b/boot/nxboot/loader/flash.c
@@ -64,7 +64,7 @@ int flash_partition_open(const char *path)
 {
   int fd;
 
-  fd = open(path, O_RDWR);
+  fd = open(path, O_RDWR | O_DIRECT);
   if (fd < 0)
     {
       syslog(LOG_ERR, "Could not open %s partition: %s\n",

Reply via email to