diff options
author | Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> | 2012-04-24 07:10:33 +0300 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-20 20:25:58 +0300 |
commit | ef7088e7f84ba550b276bc4a74f2732ee5618fb8 (patch) | |
tree | d78e5c018a29241b05e14b946b9f29e008fa6042 /drivers/mtd/ubi/io.c | |
parent | 25886a368d58edd9bb0f63d4417d2f73592b9dba (diff) |
UBI: always dump flash contents in case of errors
UBI (and UBIFS) are a bit over-engineered WRT debugging. The idea was to
link as few as possible when debugging is disabled, but the downside is
that most people produce bug reports which are difficult to understand.
Always dump the flash contents in case of errors, not only when debugging is
enabled.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/ubi/io.c')
-rw-r--r-- | drivers/mtd/ubi/io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index 507e0c6113c..9658ac80890 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c @@ -294,7 +294,7 @@ int ubi_io_write(struct ubi_device *ubi, const void *buf, int pnum, int offset, ubi_err("error %d while writing %d bytes to PEB %d:%d, written " "%zd bytes", err, len, pnum, offset, written); dump_stack(); - ubi_dbg_dump_flash(ubi, pnum, offset, len); + ubi_dump_flash(ubi, pnum, offset, len); } else ubi_assert(written == len); @@ -563,7 +563,7 @@ static int nor_erase_prepare(struct ubi_device *ubi, int pnum) */ ubi_err("cannot invalidate PEB %d, write returned %d read returned %d", pnum, err, err1); - ubi_dbg_dump_flash(ubi, pnum, 0, ubi->peb_size); + ubi_dump_flash(ubi, pnum, 0, ubi->peb_size); return -EIO; } |