When writing to a block fails the update handler fails relatively
silent. Print an error message in this case.

Signed-off-by: Sascha Hauer <[email protected]>
---
 common/imx-bbu-nand-fcb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/imx-bbu-nand-fcb.c b/common/imx-bbu-nand-fcb.c
index 3e1f35f..5ded45a 100644
--- a/common/imx-bbu-nand-fcb.c
+++ b/common/imx-bbu-nand-fcb.c
@@ -441,8 +441,10 @@ static int imx_bbu_write_firmware(struct mtd_info *mtd, 
unsigned num, void *buf,
                        continue;
                }
 
-               if (ret)
+               if (ret) {
+                       pr_err("Writing block %d failed with: %s\n", block, 
strerror(-ret));
                        return ret;
+               }
 
                len -= now;
                buf += now;
-- 
2.7.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to