projects
/
yaffs
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*** empty log message ***
[yaffs/.git]
/
yaffs_guts.c
diff --git
a/yaffs_guts.c
b/yaffs_guts.c
index b3009d273b2aad927035ca781a521acc9818181e..0a3f4435d1f6be85294e44d044d2c508bdc24f14 100644
(file)
--- a/
yaffs_guts.c
+++ b/
yaffs_guts.c
@@
-14,7
+14,7
@@
*/
//yaffs_guts.c
*/
//yaffs_guts.c
-const char *yaffs_guts_c_version="$Id: yaffs_guts.c,v 1.4
3 2005-10-11 23:43:2
7 charles Exp $";
+const char *yaffs_guts_c_version="$Id: yaffs_guts.c,v 1.4
5 2006-02-02 22:22:5
7 charles Exp $";
#include "yportenv.h"
#include "yportenv.h"
@@
-181,6
+181,7
@@
static __inline__ yaffs_BlockInfo* yaffs_GetBlockInfo(yaffs_Device *dev, int bl
static __inline__ int yaffs_HashFunction(int n)
{
static __inline__ int yaffs_HashFunction(int n)
{
+ n = abs(n);
return (n % YAFFS_NOBJECT_BUCKETS);
}
return (n % YAFFS_NOBJECT_BUCKETS);
}
@@
-3674,7
+3675,8
@@
int yaffs_ResizeFile(yaffs_Object *in, int newSize)
// using yaffs_DeleteChunk
chunkId = yaffs_FindAndDeleteChunkInFile(in,i,NULL);
// using yaffs_DeleteChunk
chunkId = yaffs_FindAndDeleteChunkInFile(in,i,NULL);
- if(chunkId < (dev->internalStartBlock * 32) || chunkId >= ((dev->internalEndBlock+1) * 32))
+ if(chunkId < (dev->internalStartBlock * dev->nChunksPerBlock) ||
+ chunkId >= ((dev->internalEndBlock+1) * dev->nChunksPerBlock))
{
//T(("Found daft chunkId %d for %d\n",chunkId,i));
}
{
//T(("Found daft chunkId %d for %d\n",chunkId,i));
}