X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_yaffs1.c;h=e3573474e4fab3b2fccb56f6944f6963a1f56469;hp=e98d04d434a3b9c68bcc5c2c1db7e21f5d024153;hb=7003e06cea707d4960217490af2c1eb65b79c352;hpb=21b2dedaa32ab309f6d1daec966528b7586bd207 diff --git a/yaffs_yaffs1.c b/yaffs_yaffs1.c index e98d04d..e357347 100644 --- a/yaffs_yaffs1.c +++ b/yaffs_yaffs1.c @@ -1,8 +1,7 @@ /* * YAFFS: Yet Another Flash File System. A NAND-flash specific file system. * - * Copyright (C) 2002-2011 Aleph One Ltd. - * for Toby Churchill Ltd and Brightstar Engineering + * Copyright (C) 2002-2018 Aleph One Ltd. * * Created by Charles Manning * @@ -21,11 +20,14 @@ int yaffs1_scan(struct yaffs_dev *dev) { +#ifdef CONFIG_NO_YAFFS1 + return YAFFS_FAIL; +#else struct yaffs_ext_tags tags; - int blk; + u32 blk; int result; int chunk; - int c; + u32 c; int deleted; enum yaffs_block_state state; LIST_HEAD(hard_list); @@ -98,6 +100,8 @@ int yaffs1_scan(struct yaffs_dev *dev) result = yaffs_rd_chunk_tags_nand(dev, chunk, NULL, &tags); + if (result != YAFFS_OK) + continue; /* Let's have a good look at this chunk... */ if (tags.ecc_result == YAFFS_ECC_RESULT_UNFIXED || @@ -419,4 +423,5 @@ int yaffs1_scan(struct yaffs_dev *dev) yaffs_trace(YAFFS_TRACE_SCAN, "yaffs1_scan ends"); return YAFFS_OK; +#endif }