mbox series

[0/4] mmc-utils: Reuse the 'help' section for command usage handling

Message ID 20250428122951.317055-1-avri.altman@sandisk.com
Headers show
Series mmc-utils: Reuse the 'help' section for command usage handling | expand

Message

Avri Altman April 28, 2025, 12:29 p.m. UTC
There is this custom in mmc-utils that has existed since time
immemorial, to add a 'usage' print for each command, should it has been
called with invalid arguments etc. Nonetheless, the `help` field of the
`struct Command` exist for each command and is much more informative.
Let's use it instead of all those per-command usage prints.

Avri Altman (4):
  mmc-utils: Remove unused adv_help member from struct Command
  mmc-utils: Simplify and streamline print_help function
  mmc-utils: Introduce a generic print_usage function
  mmc-utils: Start to use the generic print_usage function

 mmc.c      |  98 ++++++++++---------------------------
 mmc_cmds.c | 139 ++++++++++++++++++++++++++++++-----------------------
 mmc_cmds.h |   4 ++
 3 files changed, 110 insertions(+), 131 deletions(-)