public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [RFC PATCH 0/4] cmd: Simplify support for sub-commands
@ 2018-11-16 22:38 Boris Brezillon
  2018-11-16 22:38 ` [U-Boot] [RFC PATCH 1/4] common: command: Fix command auto-completion Boris Brezillon
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Boris Brezillon @ 2018-11-16 22:38 UTC (permalink / raw)
  To: u-boot

Hello,

This patch series aims at simplifying the command parsing logic done in
pretty much all the cmd/foo.c files by adding a few macros that help
defining sub-commands attach to the main entry point.

When you use those macros you also get sub-command auto-completion for
free (the rest of the auto-completion still has to be done manually).

Support for several levels of sub commands is not supported but can
easily be added if needed.

Some details about the patches:

- Patch 1 is a fix for the auto-completion code that I had to do have
  auto-completion in the mtd command working correctly (I can submit it
  separately if needed)
- Patch 2 is exposing a function to ease support of auto-completion of
  sub-commands
- Patch 3 is adding a set of macros to easily declare the sub-commands
  attached to the main command
- Patch 4 is making use of this new infrastructure in cmd/mtd.c.

Regards,

Boris

Boris Brezillon (4):
  common: command: Fix command auto-completion
  common: command: Expose a generic helper to auto-complete sub commands
  command: commands: Add macros to declare commands with subcmds
  cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands

 cmd/mtd.c         | 475 +++++++++++++++++++++++++++-------------------
 common/command.c  |  32 +++-
 include/command.h |  54 ++++++
 3 files changed, 360 insertions(+), 201 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-18 22:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-16 22:38 [U-Boot] [RFC PATCH 0/4] cmd: Simplify support for sub-commands Boris Brezillon
2018-11-16 22:38 ` [U-Boot] [RFC PATCH 1/4] common: command: Fix command auto-completion Boris Brezillon
2018-11-16 22:38 ` [U-Boot] [RFC PATCH 2/4] common: command: Expose a generic helper to auto-complete sub commands Boris Brezillon
2018-11-16 22:38 ` [U-Boot] [RFC PATCH 3/4] command: commands: Add macros to declare commands with subcmds Boris Brezillon
2018-11-16 22:38 ` [U-Boot] [RFC PATCH 4/4] cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands Boris Brezillon
2018-11-18 22:30 ` [U-Boot] [RFC PATCH 0/4] cmd: Simplify support for sub-commands Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox