Edward O'Callaghan uploaded patch set #7 to this change.

View Change

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>
---
M cli_classic.c
1 file changed, 64 insertions(+), 131 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/11/35611/7

To view, visit change 35611. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I54598efdaee2b95cb278b0f2aac05f48bbd95bef
Gerrit-Change-Number: 35611
Gerrit-PatchSet: 7
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Alan Green <avg@google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer@coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-MessageType: newpatchset