From beacf792faade4e320f43acfe7560ae9079615b1 Mon Sep 17 00:00:00 2001 From: Michal Lenc Date: Thu, 17 Jul 2025 17:12:27 +0200 Subject: [PATCH] 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 --- 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",