diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2011-09-08 14:04:37 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2011-09-08 14:04:37 +0200 |
commit | 01ee204384ad4627189ef673b79086c04f74518d (patch) | |
tree | 47efab24b57df6cb0744962bbbc3ac0706ab2cf7 | |
parent | 6b598375456932c774c4ac64dd802e8e3e732343 (diff) |
Flush during close (similar to yaffs_close()).
-rw-r--r-- | rtems/rtems_yaffs.c | 9 |
1 files changed, 8 insertions, 1 deletions
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; } |