[U-Boot] [RFC v2][PATCH] bootm: Add sub commands
Kumar Gala
galak at kernel.crashing.org
Wed Aug 13 21:42:49 CEST 2008
On Aug 13, 2008, at 10:31 AM, Kumar Gala wrote:
>
> On Aug 13, 2008, at 9:55 AM, Kumar Gala wrote:
>
>> + /* determine if we have a sub command */
>> + if (argc > 1) {
>> + char *endp;
>> +
>> + simple_strtoul(argv[1], &endp, 16);
>> + /* all of argv[1] wasn't a number, assume its a sub command */
>> + if (*endp != 0)
>> + return do_bootm_subcommand(cmdtp, flag, argc, argv);
>> + }
>> +
>
> Now that I think about this a bit more I'm not convinced this works
> for FIT.
>
> What FIT specifiers can we expect? Will it always be ADDR: or ADDR# ?
I've changed to check to be:
if ((*endp != 0) && (*endp != ':') && (*endp != '#'))
return do_bootm_subcommand(cmdtp, flag, argc, argv);
This should cover all cases that are reasonable to pass on to normal
bootm parsing.
- k
More information about the U-Boot
mailing list