
Dear Kumar Gala,
In message Pine.LNX.4.64.0809230905440.13402@blarg.am.freescale.net you wrote:
How about something like this for exposing the command table code for subcommands. I'll follow this up with an example of usage based on the bootm subcommand patch
Looks good to me. Just a question:
-cmd_tbl_t *find_cmd (const char *cmd) +cmd_tbl_t *__find_cmd (const char *cmd, cmd_tbl_t *table, int table_len)
That means we would export __find_cmd() to other functions? We shouldn't do that - "__" names are reserved.
+#define U_BOOT_CMD_INIT(name,maxargs,rep,cmd,usage,help) \ +{#name, maxargs, rep, cmd, usage, help}
I think "INIT" is not a good name here. To me it sounds like a macro to use just once. How about "ENTRY" or "MKENT" or something like this?
Best regards,
Wolfgang Denk