From 01ee204384ad4627189ef673b79086c04f74518d Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 8 Sep 2011 14:04:37 +0200 Subject: Flush during close (similar to yaffs_close()). --- rtems/rtems_yaffs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rtems/rtems_yaffs.c b/rtems/rtems_yaffs.c index 92fb171..6867bee 100644 --- a/rtems/rtems_yaffs.c +++ b/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; } -- cgit v1.2.3