From 9d6c9cd652fe4778e22349615e0ce17afbc11bec Mon Sep 17 00:00:00 2001 From: charles Date: Wed, 8 Feb 2006 22:29:14 +0000 Subject: [PATCH 1/1] Fix free space reporting as per Mikhail Rileev's patch --- yaffs_guts.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yaffs_guts.c b/yaffs_guts.c index 0ab8d8a..e949e31 100644 --- a/yaffs_guts.c +++ b/yaffs_guts.c @@ -13,7 +13,7 @@ */ const char *yaffs_guts_c_version = - "$Id: yaffs_guts.c,v 1.28 2006-02-02 22:14:44 charles Exp $"; + "$Id: yaffs_guts.c,v 1.29 2006-02-08 22:29:14 charles Exp $"; #include "yportenv.h" @@ -2347,6 +2347,7 @@ static int yaffs_GarbageCollectBlock(yaffs_Device * dev, int block) ("yaffs: About to finally delete object %d" TENDSTR), object->objectId)); yaffs_DoGenericObjectDeletion(object); + object->myDev->nDeletedFiles--; } } @@ -5691,6 +5692,8 @@ int yaffs_GetNumberOfFreeChunks(yaffs_Device * dev) nFree = yaffs_CountFreeChunks(dev); #endif + nFree += dev->nDeletedFiles; + /* Now count the number of dirty chunks in the cache and subtract those */ { -- 2.30.2