[U-Boot] [PATCH v2 0/6] cmd: Simplify support for sub-commands
Boris Brezillon
boris.brezillon at bootlin.com
Wed Nov 28 23:39:15 UTC 2018
Hello,
Here is the 2nd version of the sub-cmd patchset. This version
simplifies the sub-cmd declaration syntax and allows per
sub-cmd maxargs and repeatable check.
I also added a patch showing how simple it is to convert an existing
command to this infrastructure. I converting a bunch of other cmds [1]
but I keep that for later, as I don't want to scare reviewers with a
20+ patch series.
Regards,
Boris
[1]https://github.com/bbrezillon/u-boot/commits/sub-cmds
Changes since v1:
- Drop a few params in the subcmd macro def
- Get repeatable and maxargs info from the subcmd instead of the main
one
- Convert the adc command
Boris Brezillon (6):
common: command: Fix command auto-completion
common: command: Expose a generic helper to auto-complete sub commands
common: command: Rework the 'cmd is repeatable' logic
command: commands: Add macros to declare commands with subcmds
cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands
cmd: adc: Use the sub-command infrastructure
cmd/adc.c | 31 +--
cmd/dtimg.c | 2 +-
cmd/help.c | 2 +-
cmd/mmc.c | 4 +-
cmd/mtd.c | 476 +++++++++++++++++++++++++++-------------------
common/command.c | 68 ++++++-
include/command.h | 133 ++++++++++++-
7 files changed, 476 insertions(+), 240 deletions(-)
--
2.17.1
More information about the U-Boot
mailing list