From: Tom Rini Date: Thu, 29 Nov 2018 09:19:59 -0500 Subject: [U-Boot] [PATCH v2 3/6] common: command: Rework the 'cmd is repeatable' logic In-Reply-To: <20181128233921.16675-4-boris.brezillon@bootlin.com> References: <20181128233921.16675-1-boris.brezillon@bootlin.com> <20181128233921.16675-4-boris.brezillon@bootlin.com> Message-ID: <20181129141959.GD5048@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Reviewed-by: Tom Rini -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: