changeset 387:8e0094175e71

Add more detail to yaffs_debug
author charles <charles>
date Mon, 15 Mar 2010 22:27:15 +0000
parents 4f82eda4f2ea
children 36569f389824
files yaffs_fs.c
diffstat 1 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/yaffs_fs.c
+++ b/yaffs_fs.c
@@ -32,7 +32,7 @@
  */
 
 const char *yaffs_fs_c_version =
-    "$Id: yaffs_fs.c,v 1.100 2010-03-15 06:28:36 charles Exp $";
+    "$Id: yaffs_fs.c,v 1.101 2010-03-15 22:27:15 charles Exp $";
 extern const char *yaffs_guts_c_version;
 
 #include <linux/version.h>
@@ -2758,8 +2758,19 @@ static int yaffs_debug_proc_read(char *p
 	ylist_for_each(item, &yaffs_context_list) {
 		struct yaffs_LinuxContext *dc = ylist_entry(item, struct yaffs_LinuxContext, contextList);
 		yaffs_Device *dev = dc->dev;
+
+		int erasedChunks;
+		int nObjects;
+		int nTnodes;
+
+		erasedChunks = dev->nErasedBlocks * dev->param.nChunksPerBlock;
+		nObjects = dev->nObjectsCreated -dev->nFreeObjects;
+		nTnodes = dev->nTnodesCreated - dev->nFreeTnodes;
 		
-		buf += sprintf(buf,"%d %u %u\n", n, dev->nFreeChunks, dev->nErasedBlocks * dev->param.nChunksPerBlock);
+		
+		buf += sprintf(buf,"%d, %d, %d, %d, %d\n", 
+				n, dev->nFreeChunks, erasedChunks,
+				nObjects, nTnodes);
 	}
 	up(&yaffs_context_lock);