mtd/fs/jffs2 build.c,1.75,1.76
lunn at infradead.org
lunn at infradead.org
Sat Jul 30 11:29:30 EDT 2005
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv9102
Modified Files:
build.c
Log Message:
Allow eCos to build which does not have MTD.
Index: build.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/build.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- build.c 22 Jul 2005 10:32:07 -0000 1.75
+++ build.c 30 Jul 2005 15:29:27 -0000 1.76
@@ -317,9 +317,11 @@
c->free_size = c->flash_size;
c->nr_blocks = c->flash_size / c->sector_size;
+#ifndef __ECOS
if (c->mtd->flags & MTD_NO_VIRTBLOCKS)
c->blocks = vmalloc(sizeof(struct jffs2_eraseblock) * c->nr_blocks);
else
+#endif
c->blocks = kmalloc(sizeof(struct jffs2_eraseblock) * c->nr_blocks, GFP_KERNEL);
if (!c->blocks)
return -ENOMEM;
@@ -353,11 +355,13 @@
D1(printk(KERN_DEBUG "build_fs failed\n"));
jffs2_free_ino_caches(c);
jffs2_free_raw_node_refs(c);
- if (c->mtd->flags & MTD_NO_VIRTBLOCKS) {
- vfree(c->blocks);
- } else {
- kfree(c->blocks);
- }
+#ifndef __ECOS
+ if (c->mtd->flags & MTD_NO_VIRTBLOCKS)
+ vfree(c->blocks);
+ else
+#endif
+ kfree(c->blocks);
+
return -EIO;
}
More information about the linux-mtd-cvs
mailing list