mmc-utils: Introduce a generic print_usage function
This patch introduces a generic `print_usage` function to centralize the
handling of command usage messages. It reuses and prints the usage
information stored in the `help` field of the `struct Command`.
This refactoring simplifies command-specific usage handling by
centralizing it in a reusable function, reducing redundancy and
improving maintainability.
Signed-off-by: Avri Altman <avri.altman@sandisk.com>
Link: https://lore.kernel.org/r/20250428122951.317055-4-avri.altman@sandisk.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2 files changed