From ef7088e7f84ba550b276bc4a74f2732ee5618fb8 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Tue, 24 Apr 2012 07:10:33 +0300 Subject: 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 --- drivers/mtd/ubi/debug.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/mtd/ubi/debug.h') diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h index aff6499cde47..4bce78dc5226 100644 --- a/drivers/mtd/ubi/debug.h +++ b/drivers/mtd/ubi/debug.h @@ -21,6 +21,8 @@ #ifndef __UBI_DEBUG_H__ #define __UBI_DEBUG_H__ +void ubi_dump_flash(struct ubi_device *ubi, int pnum, int offset, int len); + #ifdef CONFIG_MTD_UBI_DEBUG #include @@ -63,7 +65,6 @@ void ubi_dbg_dump_vtbl_record(const struct ubi_vtbl_record *r, int idx); void ubi_dbg_dump_sv(const struct ubi_scan_volume *sv); void ubi_dbg_dump_seb(const struct ubi_scan_leb *seb, int type); void ubi_dbg_dump_mkvol_req(const struct ubi_mkvol_req *req); -void ubi_dbg_dump_flash(struct ubi_device *ubi, int pnum, int offset, int len); int ubi_dbg_check_all_ff(struct ubi_device *ubi, int pnum, int offset, int len); int ubi_dbg_check_write(struct ubi_device *ubi, const void *buf, int pnum, int offset, int len); @@ -205,8 +206,6 @@ static inline void ubi_dbg_dump_seb(const struct ubi_scan_leb *seb, int type) { return; } static inline void ubi_dbg_dump_mkvol_req(const struct ubi_mkvol_req *req) { return; } -static inline void ubi_dbg_dump_flash(struct ubi_device *ubi, - int pnum, int offset, int len) { return; } static inline void ubi_dbg_print_hex_dump(const char *l, const char *ps, int pt, int r, int g, const void *b, size_t len, bool a) { return; } -- cgit v1.2.3