Index: gc.c =================================================================== RCS file: /home/cvs/ecos_artisan/packages/fs/jffs2/current/src/gc.c,v retrieving revision 1.5 diff -u -F^f -r1.5 gc.c --- gc.c 22 Jul 2004 21:35:32 -0000 1.5 +++ gc.c 6 Oct 2004 15:09:18 -0000 @@ -1188,7 +1188,15 @@ cdatalen = min_t(uint32_t, alloclen - sizeof(ri), end - offset); datalen = end - offset; +#if defined(__ECOS) + /* + For the eCos port, jffs2_gc_fetch_page above reads 4K into a static + buffer. + */ + writebuf = pg_ptr + ((offset-start) & (PAGE_CACHE_SIZE -1)); +#else writebuf = pg_ptr + (offset & (PAGE_CACHE_SIZE -1)); +#endif comprtype = jffs2_compress(c, f, writebuf, &comprbuf, &datalen, &cdatalen);