Skip to content
Snippets Groups Projects
Commit 8b60fc7a authored by Edward O'Callaghan's avatar Edward O'Callaghan Committed by Nico Huber
Browse files

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: default avatarEdward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/35611


Tested-by: default avatarbuild bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: default avatarNico Huber <nico.h@gmx.de>
parent 16ec45c0
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment