diff mbox

[U-Boot,v2,01/14] mtd: uboot: Add meaningful error message

Message ID 1444912462-3949-2-git-send-email-maxime.ripard@free-electrons.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Maxime Ripard Oct. 15, 2015, 12:34 p.m. UTC
The current error message in get_part if CONFIG_MTDPARTS is disabled is
"offset is not a number" which is confusing and doesn't help at all.

Change that for something that might give a hint on what's going on.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
---
 drivers/mtd/mtd_uboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Nov. 13, 2015, 1:26 a.m. UTC | #1
On Thu, Oct 15, 2015 at 02:34:09PM +0200, Maxime Ripard wrote:

> The current error message in get_part if CONFIG_MTDPARTS is disabled is
> "offset is not a number" which is confusing and doesn't help at all.
> 
> Change that for something that might give a hint on what's going on.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index c517b9c65d68..21386951efd5 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -37,7 +37,7 @@  static int get_part(const char *partname, int *idx, loff_t *off, loff_t *size,
 
 	return 0;
 #else
-	puts("offset is not a number\n");
+	puts("mtdparts support missing.\n");
 	return -1;
 #endif
 }