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 <michallenc@seznam.cz>
This commit is contained in:
Michal Lenc 2025-07-17 17:12:27 +02:00 committed by CeDeROM
parent 2de49b8b22
commit beacf792fa

View file

@ -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",