Skip to content

Commit beacf79

Browse files
michallenccederom
authored andcommitted
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 <[email protected]>
1 parent 2de49b8 commit beacf79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

boot/nxboot/loader/flash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ int flash_partition_open(const char *path)
6464
{
6565
int fd;
6666

67-
fd = open(path, O_RDWR);
67+
fd = open(path, O_RDWR | O_DIRECT);
6868
if (fd < 0)
6969
{
7070
syslog(LOG_ERR, "Could not open %s partition: %s\n",

0 commit comments

Comments
 (0)