#endif
-const char *yaffsfs_c_version="$Id: yaffsfs.c,v 1.25 2009-03-05 01:47:17 charles Exp $";
+const char *yaffsfs_c_version="$Id: yaffsfs.c,v 1.27 2009-10-08 01:57:59 charles Exp $";
// configurationList is the list of devices that are supported
static yaffsfs_DeviceConfiguration *yaffsfs_configurationList;
return handle;
}
-int yaffs_flush(int fd)
+int yaffs_Dofsync(int fd,int datasync)
{
yaffsfs_Handle *h = NULL;
int retVal = 0;
if(h && h->inUse)
{
// flush the file
- yaffs_FlushFile(h->obj,1);
+ yaffs_FlushFile(h->obj,1,datasync);
}
else
{
return retVal;
}
+int yaffs_fsync(int fd)
+{
+ return yaffs_Dofsync(fd,0);
+}
+
+int yaffs_flush(int fd)
+{
+ return yaffs_fsync(fd);
+}
+
+int yaffs_fdatasync(int fd)
+{
+ return yaffs_Dofsync(fd,1);
+}
int yaffs_close(int fd)
{
if(h && h->inUse)
{
// clean up
- yaffs_FlushFile(h->obj,1);
+ yaffs_FlushFile(h->obj,1,0);
h->obj->inUse--;
if(h->obj->inUse <= 0 && h->obj->unlinked)
{
}
obj->dirty = 1;
- result = yaffs_FlushFile(obj,0);
+ result = yaffs_FlushFile(obj,0,0);
retVal = 0;
}
else
{
obj->yst_mode = mode;
obj->dirty = 1;
- result = yaffs_FlushFile(obj,0);
+ result = yaffs_FlushFile(obj,0,0);
}
return result == YAFFS_OK ? 0 : -1;
return retVal;
}
-int yaffs_mknod(const YCHAR *pathname, mode_t mode, dev_t dev);
+int yaffs_mknod(const YCHAR *pathname, mode_t mode, dev_t dev)
+{
+ return -1;
+}
int yaffs_DumpDevStruct(const YCHAR *path)
{