[PATCH 1/2] ubiformat: Ignore bitflip errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixes: 1d88c66 ubiformat: Use mtd-peb API

bit flips are no error, when encountering them during scanning of a
device just ignore them.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 lib/libscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libscan.c b/lib/libscan.c
index bf298a7..13bd625 100644
--- a/lib/libscan.c
+++ b/lib/libscan.c
@@ -82,7 +82,7 @@ int libscan_ubi_scan(struct mtd_info *mtd, struct ubi_scan_info **info,
 		}
 
 		ret = mtd_peb_read(mtd, &ech, eb, 0, sizeof(struct ubi_ec_hdr));
-		if (ret < 0)
+		if (ret < 0 && !mtd_is_bitflip(ret))
 			goto out_ec;
 
 		if (be32_to_cpu(ech.magic) != UBI_EC_HDR_MAGIC) {
-- 
2.8.0.rc3


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux