diff options
author | Edward O'Callaghan <quasisec@chromium.org> | 2019-09-26 11:17:20 +1000 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2019-10-17 08:29:35 +0000 |
commit | 8b60fc7a5bac409f8a4e0648f1fba51aa3497afb (patch) | |
tree | 8ce22803fb0e3410725e5719bae4f36de162045f /print_wiki.c | |
parent | 16ec45c0fc9ad172b66f07a94c64a3a17c111ca0 (diff) | |
download | flashrom-8b60fc7a5bac409f8a4e0648f1fba51aa3497afb.tar.gz flashrom-8b60fc7a5bac409f8a4e0648f1fba51aa3497afb.tar.bz2 flashrom-8b60fc7a5bac409f8a4e0648f1fba51aa3497afb.zip |
cli_classic: Tidy up some repeated handling patterns into funcs
Introduce cli_classic_single_operation() to consolidate the repeating
pattern of multiple CLI operations at once. Also modify
cli_classic_abort_usage() to take an optional error abort string and
print it to stderr, this allows for trimming a few more lines off the
cli implementation.
V.2: A few fixes upon review:
- Trim off some unnecessary braces for single line branches.
- Pass 'operation_specified' by reference.
- Rename a function.
V.3: Fix print order of cli_classic_abort_usage().
Change-Id: I54598efdaee2b95cb278b0f2aac05f48bbd95bef
Signed-off-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/35611
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'print_wiki.c')
0 files changed, 0 insertions, 0 deletions