X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=yaffs_guts.c;h=bcd3da1082675e008e918e5491a3af772d77af64;hb=8cc260c1954603f2efcd13bca480eed8bd47a7e2;hp=49e3180f7e895bdbf4184b76d5dd68ecb507d23e;hpb=661854a1749d8e4bb2b8172894c2048394461b27;p=yaffs%2F.git diff --git a/yaffs_guts.c b/yaffs_guts.c index 49e3180..bcd3da1 100644 --- a/yaffs_guts.c +++ b/yaffs_guts.c @@ -14,7 +14,7 @@ */ //yaffs_guts.c -const char *yaffs_guts_c_version="$Id: yaffs_guts.c,v 1.32 2003-11-11 00:44:51 charles Exp $"; +const char *yaffs_guts_c_version="$Id: yaffs_guts.c,v 1.34 2004-06-08 08:47:55 charles Exp $"; #include "yportenv.h" @@ -1085,7 +1085,7 @@ static int yaffs_DeleteWorker(yaffs_Object *in, yaffs_Tnode *tn, __u32 level, in if(limit) { *limit = *limit-1; - if(limit <= 0) + if(*limit <= 0) { hitLimit = 1; } @@ -1743,7 +1743,7 @@ yaffs_Object *yaffs_MknodObject( yaffs_ObjectType type, #ifdef CONFIG_YAFFS_WINCE yfsd_WinFileTimeNow(in->win_atime); in->win_ctime[0] = in->win_mtime[0] = in->win_atime[0]; - in->win_ctime[1] = in->win_mtime[1] = in->win_atime[0]; + in->win_ctime[1] = in->win_mtime[1] = in->win_atime[1]; #else #if defined(CONFIG_KERNEL_2_5) @@ -2302,6 +2302,7 @@ static int yaffs_GarbageCollectBlock(yaffs_Device *dev,int block) { // It's a header object->chunkId = newChunk; + object->serial = tags.serialNumber; } else { @@ -4227,8 +4228,9 @@ static int yaffs_Scan(yaffs_Device *dev) { // Hoosterman, another problem.... // We're trying to use a non-directory as a directory - // Todo ... handle - T(YAFFS_TRACE_ERROR, (TSTR("yaffs tragedy: attempting to use non-directory as a directory in scan" TENDSTR))); + + T(YAFFS_TRACE_ERROR, (TSTR("yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found." TENDSTR))); + parent = dev->lostNFoundDir; } @@ -4842,6 +4844,8 @@ void yaffs_Deinitialise(yaffs_Device *dev) yaffs_DeinitialiseBlocks(dev); yaffs_DeinitialiseTnodes(dev); yaffs_DeinitialiseObjects(dev); + if(dev->nShortOpCaches > 0) + YFREE(dev->srCache); YFREE(dev->localBuffer); }