diff options
author | Xiangfu Liu <xiangfu@sharism.cc> | 2011-09-13 11:12:29 +0800 |
---|---|---|
committer | Xiangfu Liu <xiangfu@sharism.cc> | 2011-09-13 11:28:50 +0800 |
commit | 4f5938aebf5d14197c1a8de8531184fe4f12cbca (patch) | |
tree | 6d007754ab2d761a48361c984db37c6a4f3bfafe /yaffs_packedtags2.c | |
parent | 01ee204384ad4627189ef673b79086c04f74518d (diff) |
add rtems-mkyaffs2image support
Diffstat (limited to 'yaffs_packedtags2.c')
-rw-r--r-- | yaffs_packedtags2.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/yaffs_packedtags2.c b/yaffs_packedtags2.c index 820bc41..b8546cf 100644 --- a/yaffs_packedtags2.c +++ b/yaffs_packedtags2.c @@ -97,10 +97,12 @@ void yaffs_pack_tags2(struct yaffs_packed_tags2 *pt, { yaffs_pack_tags2_tags_only(&pt->t, t); +#ifndef RTEMS_MKYAFFS2IMAGE if (tags_ecc) yaffs_ecc_calc_other((unsigned char *)&pt->t, sizeof(struct yaffs_packed_tags2_tags_only), &pt->ecc); +#endif } void yaffs_unpack_tags2_tags_only(struct yaffs_ext_tags *t, @@ -149,8 +151,12 @@ void yaffs_unpack_tags2(struct yaffs_ext_tags *t, struct yaffs_packed_tags2 *pt, if (pt->t.seq_number != 0xffffffff && tags_ecc) { /* Chunk is in use and we need to do ECC */ - struct yaffs_ecc_other ecc; int result; + +#ifdef RTEMS_MKYAFFS2IMAGE + result = 0; +#else + struct yaffs_ecc_other ecc; yaffs_ecc_calc_other((unsigned char *)&pt->t, sizeof(struct yaffs_packed_tags2_tags_only), &ecc); @@ -158,6 +164,7 @@ void yaffs_unpack_tags2(struct yaffs_ext_tags *t, struct yaffs_packed_tags2 *pt, yaffs_ecc_correct_other((unsigned char *)&pt->t, sizeof(struct yaffs_packed_tags2_tags_only), &pt->ecc, &ecc); +#endif switch (result) { case 0: ecc_result = YAFFS_ECC_RESULT_NO_ERROR; |