buf->f_blocks = yaffs_SuperToDevice(sb)->nBlocks * YAFFS_CHUNKS_PER_BLOCK;
buf->f_files = 0;
buf->f_ffree = 0;
- buf->f_bavail = yaffs_GetNumberOfFreeChunks(yaffs_SuperToDevice(sb));
+ buf->f_bavail = buf->f_bfree = yaffs_GetNumberOfFreeChunks(yaffs_SuperToDevice(sb));
return 0;
}
// Set up the memory size parameters....
- dev->nBlocks = YAFFS_RAM_EMULATION_SIZE / (YAFFS_CHUNKS_PER_BLOCK * YAFFS_BYTES_PER_CHUNK);
+// NCB dev->nBlocks = YAFFS_RAM_EMULATION_SIZE / (YAFFS_CHUNKS_PER_BLOCK * YAFFS_BYTES_PER_CHUNK);
+ dev->nBlocks = mtd->size / (YAFFS_CHUNKS_PER_BLOCK * YAFFS_BYTES_PER_CHUNK);
dev->startBlock = 1; // Don't use block 0
dev->endBlock = dev->nBlocks - 1;
remove_proc_entry("yaffs",&proc_root);
#ifdef YAFFS_RAM_ENABLED
- unregister_filesystem(&yaffs_fs_type);
+// NCB unregister_filesystem(&yaffs_fs_type);
+ unregister_filesystem(&yaffs_ram_fs_type);
#endif
#ifdef YAFFS_MTD_ENABLED
- unregister_filesystem(&yaffs_ram_fs_type);
+// NCB unregister_filesystem(&yaffs_ram_fs_type);
+ unregister_filesystem(&yaffs_fs_type);
#endif
}