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

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

commit 20c7cdacf58093f462ab5c664e3777820504cb74
Author: yangsong8 <[email protected]>
AuthorDate: Fri Oct 30 16:29:44 2026 +0800

    apps/fastboot: add O_DIRECT param when open
    
    No need to read back when writing Flash and it is more effiecntly
    when use O_DIRECT.
    
    Signed-off-by: yangsong8 <[email protected]>
    Signed-off-by: wangjianyu3 <[email protected]>
---
 system/fastboot/fastboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system/fastboot/fastboot.c b/system/fastboot/fastboot.c
index 34b916ad8..47cbf99f7 100644
--- a/system/fastboot/fastboot.c
+++ b/system/fastboot/fastboot.c
@@ -403,7 +403,7 @@ static void fastboot_okay(FAR struct fastboot_ctx_s *ctx,
 
 static int fastboot_flash_open(FAR const char *name)
 {
-  int fd = open(name, O_RDWR | O_CLOEXEC);
+  int fd = open(name, O_RDWR | O_CLOEXEC | O_DIRECT);
 
   if (fd < 0)
     {

Reply via email to