
Hi Wolfgang; Sorry, been away for 1 week. The constant 10 is the size of an array that is arbitrarily chosen so that it is big enough to hold the current mtd device identifier such as nor0, nor1, nor2, nand0, nand1, nand2, etc.
Regards, KH
-----Original Message----- From: Wolfgang Denk [mailto:wd@denx.de] Sent: Friday, February 12, 2010 11:28 PM To: Teh Kok How Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH]: common/cmd_flash.c: bug-fix
Dear "Teh Kok How",
In message 89D4E2CB6B654B3FB0DA6A0CE6650515@smartbridges.com you wrote:
--- u-boot-2009.11.1.orig/common/cmd_flash.c 2010-01-25 16:35:12.000000000 +0800 +++ u-boot-2009.11.1.new/common/cmd_flash.c 2010-02-12 16:18:10.565540182 +0800 @@ -43,6 +43,7 @@
#ifndef CONFIG_SYS_NO_FLASH extern flash_info_t flash_info[]; /* info for FLASH chips */ +extern struct mtd_device *current_mtd_dev;
/*
- The user interface starts numbering for Flash banks with 1
@@ -331,6 +332,7 @@ u8 dev_type, dev_num, pnum; #endif int rcode = 0;
char mtd_dev[10];
Where is this magic constant 10 coming from?
Best regards,
Wolfgang Denk