X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=yaffs_tagsmarshall.c;h=98ae10d2a760e73a9a43b1ac3ab4f4b8c9409144;hb=b295567b94e6d4014938e42e978306a13b330bb3;hp=401a7561520195493fc5bcb7748c799f78ef0f1b;hpb=df88cf1097f3b7012fc1010cccd4e682fb13de97;p=yaffs2.git diff --git a/yaffs_tagsmarshall.c b/yaffs_tagsmarshall.c index 401a756..98ae10d 100644 --- a/yaffs_tagsmarshall.c +++ b/yaffs_tagsmarshall.c @@ -118,13 +118,13 @@ static int yaffs_tags_marshall_read(struct yaffs_dev *dev, dev->n_ecc_unfixed++; } - if (tags && ecc_result == -YAFFS_ECC_RESULT_FIXED) { + if (tags && ecc_result == YAFFS_ECC_RESULT_FIXED) { if (tags->ecc_result <= YAFFS_ECC_RESULT_NO_ERROR) tags->ecc_result = YAFFS_ECC_RESULT_FIXED; dev->n_ecc_fixed++; } - if (ecc_result < YAFFS_ECC_RESULT_UNFIXED) + if (retval == YAFFS_OK && ecc_result < YAFFS_ECC_RESULT_UNFIXED) return YAFFS_OK; else return YAFFS_FAIL; @@ -184,16 +184,16 @@ void yaffs_tags_marshall_install(struct yaffs_dev *dev) if (!dev->param.is_yaffs2) return; - if (!dev->th.write_chunk_tags_fn) - dev->th.write_chunk_tags_fn = yaffs_tags_marshall_write; + if (!dev->tagger.write_chunk_tags_fn) + dev->tagger.write_chunk_tags_fn = yaffs_tags_marshall_write; - if (!dev->th.read_chunk_tags_fn) - dev->th.read_chunk_tags_fn = yaffs_tags_marshall_read; + if (!dev->tagger.read_chunk_tags_fn) + dev->tagger.read_chunk_tags_fn = yaffs_tags_marshall_read; - if (!dev->th.query_block_fn) - dev->th.query_block_fn = yaffs_tags_marshall_query_block; + if (!dev->tagger.query_block_fn) + dev->tagger.query_block_fn = yaffs_tags_marshall_query_block; - if (!dev->th.mark_bad_fn) - dev->th.mark_bad_fn = yaffs_tags_marshall_mark_bad; + if (!dev->tagger.mark_bad_fn) + dev->tagger.mark_bad_fn = yaffs_tags_marshall_mark_bad; }