projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Checkpointing changes
[yaffs2.git]
/
direct
/
yaffsfs.c
diff --git
a/direct/yaffsfs.c
b/direct/yaffsfs.c
index 914e714b412ec2ef587b6142b779a6dc99c8f09c..67671ea6b69e90ce155b7cb68437f9c99ed34792 100644
(file)
--- a/
direct/yaffsfs.c
+++ b/
direct/yaffsfs.c
@@
-25,7
+25,7
@@
#endif
#endif
-const char *yaffsfs_c_version="$Id: yaffsfs.c,v 1.
8 2006-02-08 22:38:24
charles Exp $";
+const char *yaffsfs_c_version="$Id: yaffsfs.c,v 1.
12 2006-05-08 10:13:35
charles Exp $";
// configurationList is the list of devices that are supported
static yaffsfs_DeviceConfiguration *yaffsfs_configurationList;
// configurationList is the list of devices that are supported
static yaffsfs_DeviceConfiguration *yaffsfs_configurationList;
@@
-999,13
+999,14
@@
int yaffs_fchmod(int fd, mode_t mode)
int yaffs_mkdir(const char *path, mode_t mode)
{
yaffs_Object *parent = NULL;
int yaffs_mkdir(const char *path, mode_t mode)
{
yaffs_Object *parent = NULL;
- yaffs_Object *dir;
+ yaffs_Object *dir
= NULL
;
char *name;
int retVal= -1;
yaffsfs_Lock();
parent = yaffsfs_FindDirectory(NULL,path,&name,0);
char *name;
int retVal= -1;
yaffsfs_Lock();
parent = yaffsfs_FindDirectory(NULL,path,&name,0);
- dir = yaffs_MknodDirectory(parent,name,mode,0,0);
+ if(parent)
+ dir = yaffs_MknodDirectory(parent,name,mode,0,0);
if(dir)
{
retVal = 0;
if(dir)
{
retVal = 0;
@@
-1075,6
+1076,10
@@
int yaffs_unmount(const char *path)
{
int i;
int inUse;
{
int i;
int inUse;
+
+ yaffs_FlushEntireDeviceCache(dev);
+ yaffs_CheckpointSave(dev);
+
for(i = inUse = 0; i < YAFFSFS_N_HANDLES && !inUse; i++)
{
if(yaffsfs_handle[i].inUse && yaffsfs_handle[i].obj->myDev == dev)
for(i = inUse = 0; i < YAFFSFS_N_HANDLES && !inUse; i++)
{
if(yaffsfs_handle[i].inUse && yaffsfs_handle[i].obj->myDev == dev)
@@
-1407,7
+1412,7
@@
int yaffs_link(const char *oldpath, const char *newpath)
// Creates a link called newpath to existing oldpath
yaffs_Object *obj = NULL;
yaffs_Object *target = NULL;
// Creates a link called newpath to existing oldpath
yaffs_Object *obj = NULL;
yaffs_Object *target = NULL;
- int retVal;
+ int retVal
= 0
;
yaffsfs_Lock();
yaffsfs_Lock();