diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-05-17 12:44:45 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-05-20 07:57:59 +0200 |
commit | 821de09b1fb67267ded3da11b51bd9245a6e1ce3 (patch) | |
tree | ea27b0b24a2763c79ef69c6abbb414d0760da179 /lib | |
parent | b47a5a7ed6d105a64c02893d5150517fc2ff5f72 (diff) | |
download | barebox-821de09b1fb67267ded3da11b51bd9245a6e1ce3.tar.gz barebox-821de09b1fb67267ded3da11b51bd9245a6e1ce3.tar.xz |
ubiformat: Ignore bitflip errors
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@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libscan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libscan.c b/lib/libscan.c index bf298a70bb..13bd625a4c 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) { |