diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-07-24 15:31:33 +0300 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-08-14 20:02:20 +0300 |
commit | 867996b15c1f0a98d2c405bada907e97499ba8c2 (patch) | |
tree | 3ca5bfb6e74ef5697bb89d29365f6c4df7ab4c03 /drivers/mtd/ubi/io.c | |
parent | 758d8e46347aee199e7025b8c571bab75d2de63f (diff) | |
download | op-kernel-dev-867996b15c1f0a98d2c405bada907e97499ba8c2.zip op-kernel-dev-867996b15c1f0a98d2c405bada907e97499ba8c2.tar.gz |
UBI: introduce flash dump helper
Useful for debugging problems, compiled in only if UBI debugging
is enabled. This patch also makes the UBI writing function dump
the flash if it fails to write.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/io.c')
-rw-r--r-- | drivers/mtd/ubi/io.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index 4e7bcb2..b693138 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c @@ -269,6 +269,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); ubi_dbg_dump_stack(); + ubi_dbg_dump_flash(ubi, pnum, offset, len); } else ubi_assert(written == len); |