Skip to content

Commit

Permalink
platforms/nuttx/src/px4/common/px4_24xxxx_mtd.c: Add BIOC_FLUSH
Browse files Browse the repository at this point in the history
There is nothing left to do after bchlib, but this needs to return OK
in order for "fsync" not to fail.

Signed-off-by: Jukka Laitinen <[email protected]>
  • Loading branch information
jlaitine committed Dec 16, 2024
1 parent b97355e commit e33a38c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions platforms/nuttx/src/px4/common/px4_24xxxx_mtd.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,11 @@ static int at24c_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
ret = at24c_eraseall(priv);
break;

case BIOC_FLUSH:
/* bchlib has already taken care of writing the pages */
ret = OK;
break;

default:
ret = -ENOTTY; /* Bad command */
break;
Expand Down

0 comments on commit e33a38c

Please sign in to comment.