[U-Boot] [PATCH v2 4/6] command: commands: Add macros to declare commands with subcmds

Tom Rini trini at konsulko.com
Thu Nov 29 14:20:03 UTC 2018


On Thu, Nov 29, 2018 at 12:39:19AM +0100, Boris Brezillon wrote:

> Most cmd/xxx.c source files expose several commands through a single
> entry point. Some of them are doing the sub-command parsing manually in
> their do_<cmd>() function, others are declaring a table of sub-commands
> and then use find_cmd_tbl() to delegate the request to the sub command
> handler.
> 
> In both case, the amount of code to do that is not negligible and
> repetitive, not to mention that almost no commands are implementing
> a auto-completion hook, which means most u-boot lack auto-completion.
> 
> Provide several macros to easily define sub-commands and commands
> exposing such sub-commands.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon at bootlin.com>

Reviewed-by: Tom Rini <trini at konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181129/578ec0b4/attachment.sig>


More information about the U-Boot mailing list