From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/6] common: command: Rework the 'cmd is repeatable' logic
Date: Thu, 29 Nov 2018 09:19:59 -0500 [thread overview]
Message-ID: <20181129141959.GD5048@bill-the-cat> (raw)
In-Reply-To: <20181128233921.16675-4-boris.brezillon@bootlin.com>
On Thu, Nov 29, 2018 at 12:39:18AM +0100, Boris Brezillon wrote:
> The repeatable property is currently attached to the main command and
> sub-commands have no way to change the repeatable value (the ->repeatable
> field in sub-command entries is ignored).
>
> Replace the ->repeatable field by an extended ->cmd() hook (called
> ->cmd_rep()) which takes a new int pointer to store the repeatable cap
> of the command being executed.
>
> With this trick, we can let sub-commands decide whether they are
> repeatable or not.
>
> We also patch mmc and dtimg who are testing the ->repeatable field
> directly (they now use cmd_is_repeatable() instead), and fix the help
> entry manually since it doesn't use the U_BOOT_CMD() macro.
>
> 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/ac2f2448/attachment.sig>
next prev parent reply other threads:[~2018-11-29 14:19 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 [this message]
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
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=20181129141959.GD5048@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