From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 4/6] command: commands: Add macros to declare commands with subcmds
Date: Thu, 29 Nov 2018 09:20:03 -0500 [thread overview]
Message-ID: <20181129142003.GE5048@bill-the-cat> (raw)
In-Reply-To: <20181128233921.16675-5-boris.brezillon@bootlin.com>
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@bootlin.com>
Reviewed-by: Tom Rini <trini@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>
next prev parent reply other threads:[~2018-11-29 14:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-28 23:39 [U-Boot] [PATCH v2 0/6] cmd: Simplify support for sub-commands Boris Brezillon
2018-11-28 23:39 ` [U-Boot] [PATCH v2 1/6] common: command: Fix command auto-completion Boris Brezillon
2018-11-29 14:19 ` Tom Rini
2018-11-28 23:39 ` [U-Boot] [PATCH v2 2/6] common: command: Expose a generic helper to auto-complete sub commands Boris Brezillon
2018-11-29 14:19 ` Tom Rini
2018-11-29 15:16 ` Boris Brezillon
2018-11-28 23:39 ` [U-Boot] [PATCH v2 3/6] common: command: Rework the 'cmd is repeatable' logic Boris Brezillon
2018-11-29 14:19 ` Tom Rini
2018-11-28 23:39 ` [U-Boot] [PATCH v2 4/6] command: commands: Add macros to declare commands with subcmds Boris Brezillon
2018-11-29 14:20 ` Tom Rini [this message]
2018-11-29 15:22 ` Boris Brezillon
2018-11-28 23:39 ` [U-Boot] [PATCH v2 5/6] cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands Boris Brezillon
2018-11-29 14:21 ` Tom Rini
2018-11-28 23:39 ` [U-Boot] [PATCH v2 6/6] cmd: adc: Use the sub-command infrastructure Boris Brezillon
2018-11-29 14:21 ` Tom Rini
2018-11-29 15:26 ` [U-Boot] [PATCH v2 0/6] cmd: Simplify support for sub-commands Boris Brezillon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181129142003.GE5048@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox