Skip to content
Browse files

Flush during close (similar to yaffs_close()).

  • Loading branch information...
1 parent 6b59837 commit 01ee204384ad4627189ef673b79086c04f74518d @sebhub sebhub committed
Showing with 8 additions and 1 deletion.
  1. +8 −1 rtems/rtems_yaffs.c
View
9 rtems/rtems_yaffs.c
@@ -702,7 +702,14 @@ static int ycb_file_open(rtems_libio_t *iop, const char *pathname, uint32_t flag
static int ycb_file_close(rtems_libio_t *iop)
{
- /* nothing to do */
+ const rtems_filesystem_location_info_t *pathinfo = &iop->pathinfo;
+ struct yaffs_obj *obj = pathinfo->node_access;
+ struct yaffs_dev *dev = obj->my_dev;
+
+ ylock(dev);
+ yaffs_flush_file(obj, 1, 0);
+ yunlock(dev);
+
return 0;
}

0 comments on commit 01ee204

Please sign in to comment.
Something went wrong with that request. Please try again.