From 8b140dd328588fc3fc38931fa5bce2c4d6e1d9e5 Mon Sep 17 00:00:00 2001 From: charles Date: Mon, 15 Mar 2010 22:27:15 +0000 Subject: [PATCH] Add more detail to yaffs_debug --- yaffs_fs.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/yaffs_fs.c b/yaffs_fs.c index c686fd5..aaf3f0b 100644 --- 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 @@ -2758,8 +2758,19 @@ static int yaffs_debug_proc_read(char *page, 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); -- 2.30.2