David Hendricks 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)
Patch Set 2:
This might make it more confusing for the moment, my goal would be to have something like
flashrom -p internal --ifd -i bios:cbfs.bin --mode write #1
for individual regions, and
flashrom -p internal -i all:some.rom --mode write #2
for the whole flash, where
flashrom -p internal -w some.rom #3
would be a shorthand for #2.
In any case, this is a step in the right direction by making full-sized filename optional. I'll be completely onboard if `flashrom -p internal --ifd -i bios:cbfs.bin -w` can be shorthand for #1 and `flashrom -p internal -i all:some.rom -w` can be shorthand for #2.
Otherwise, we should should deprecate -w/-r/-E/-v to be consistent for the various use cases.
https://review.coreboot.org/#/c/30979/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/30979/2//COMMIT_MSG@14 PS2, Line 14: provide better error messages. I'm not sure what is so complex... Optional arguments are well-supported by getopt_long() and non-positional filename was how flashrom originally worked.
Some day I'll get around to rebasing my patches to demonstrate this more clearly...