Attention is currently required from: Nico Huber, 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)
Patchset:
PS2: I believe the main difference between this approach and CB:52362 is that this -m argument is only needed if no -r/-v/-w <file> is specified but not needed/allowed otherwise.
With this apporach: - If someone wants to read a region *and* the whole chip: # flashrom -i region:region-file.bin -r chip-file.bin - If someone wants to read a region *and not* the whole chip: # flashrom -i region:region-file.bin -m r
With CB:52362 - If someone wants to read a region *and* the whole chip: # flashrom -i region:region-file.bin -r chip-file.bin - If someone wants to read a region *and not* the whole chip: # flashrom -i region:region-file.bin -r
I *personally* think having -r do the signaling for both types of reads is cleaner given that -m won't be used for "normal" full chip reads.
As an a side (not that I'm saying this should be a deciding factor for upstream direction): the second approach should be compatible with chromium usage and will keep both CLIs almost ("almost" chromium has a couple of additional flags --do-not-diff and --ignore-lock) aligned as of today.