Attention is currently required from: Nico Huber, David Hendricks, Edward O'Callaghan. Daniel Campello has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/30979 )
Change subject: [RFC] cli_classic: Add `--mode (read|write|verify|erase)` parameter ......................................................................
Patch Set 2:
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/30979/comment/b0e6c807_62ace6b7 PS2, Line 14: provide better error messages.
I have to say I didn't really like dealing with the optional argument in the cros tree David however […]
I'm not sure how the combinatorics are smaller in this case. I believe is the same amount of cases as I presented on my previous message.
Re error reporting we can make it clear that both options exist: "Missing region filename for region <region> when no flash_chip file was provided with <operation>"
I still think that the UX around keeping the same flag for the same operation (regardless of the input/output artifacts) is much easier to reason about from the user perspective. Having -r <file> and -m r[ead] options for reading flash chip in my opinion is confusing. Just to reiterate what David said optional arguments are not outside of standard as they are supported by getopt.
Said all of that, if the consensus is for this option I am fine with it.