- __u32 theChunk = yaffs_GetChunkGroupBase(dev, tn, i);
-
- if (theChunk > 0) {
- /* T(~0,(TSTR("verifying (%d:%d) %d"TENDSTR),tags.objectId,tags.chunkId,theChunk)); */
- yaffs_ReadChunkWithTagsFromNAND(dev, theChunk, NULL, &tags);
- if (tags.objectId != objectId || tags.chunkId != chunkOffset) {
- T(~0, (TSTR("Object %d chunkId %d NAND mismatch chunk %d tags (%d:%d)"TENDSTR),
- objectId, chunkOffset, theChunk,
- tags.objectId, tags.chunkId));
+ __u32 the_chunk = yaffs_get_group_base(dev, tn, i);
+
+ if (the_chunk > 0) {
+ /* T(~0,(TSTR("verifying (%d:%d) %d"TENDSTR),tags.obj_id,tags.chunk_id,the_chunk)); */
+ yaffs_rd_chunk_tags_nand(dev, the_chunk, NULL, &tags);
+ if (tags.obj_id != obj_id || tags.chunk_id != chunk_offset) {
+ T(~0, (TSTR("Object %d chunk_id %d NAND mismatch chunk %d tags (%d:%d)"TENDSTR),
+ obj_id, chunk_offset, the_chunk,
+ tags.obj_id, tags.chunk_id));