TSI148: Fix argument parsing
PATCH 1/1 TSI148: Fix argument parsing
From: Brent Darley <[email protected]>
This patch does 2 things:
- Fix the argument number assigned to the vdw (VME data width) value. Previously, a nonexistent 7th arument was read as the vdw variable.
- Reduce the size of the argument array for the tsi148 command from 8 to 7. The tsi148 command itself is argument index 0, and the maximum number arguments passed to the command is 6, making a total of 7 for the array.
--- common/cmd_tsi148.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
common/cmd_tsi148.c +2 -2
@@ -419,7 +419,7 @@ int do_tsi148(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])if (argc >5 ) vam =simple_strtoul (argv[5 ],NULL ,16 );if (argc >6 ) - vdw =simple_strtoul (argv[7 ],NULL ,16 ); + vdw =simple_strtoul (argv[6 ],NULL ,16 );switch (cmd) {case 'c' :
@@ -465,7 +465,7 @@ int do_tsi148(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) }U_BOOT_CMD ( - tsi148,8 ,1 , do_tsi148, + tsi148,7 ,1 , do_tsi148,"initialize and configure Turndra Tsi148\n" ,"init\n" " - initialize tsi148\n"
Signature · 1 line
1.7.0.4
Wolfgang Denk
AppliedPATCH 1/1 TSI148: Fix argument parsing
Dear Peter Tyser,
Quoted 11 lines · In message <[email protected]> you wrote:
From: Brent Darley <[email protected]>
This patch does 2 things:
- Fix the argument number assigned to the vdw (VME data width) value. Previously, a nonexistent 7th arument was read as the vdw variable.- Reduce the size of the argument array for the tsi148 command from 8 to 7. The tsi148 command itself is argument index 0, and the maximum number arguments passed to the command is 6, making a total of 7 for the array.
Quoted 5 lines
Signed-off-by Brent Darley <[email protected]>Signed-off-by Peter Tyser <[email protected]>--- common/cmd_tsi148.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de How many Unix hacks does it take to change a light bulb? Let's see, can you use a shell script for that or does it need a C program?