Nico Huber 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)
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.
Well, I added a short form `-m` and a prefix check, so `-mw` would work. `-w` does still ask for a file name.
Otherwise, we should should deprecate -w/-r/-E/-v to be consistent for the various use cases.
I'm not sure what is so complex... […] The parsing part is solved, Arthur looked after that in
I thought about that, too. But the old syntax is really handy when it comes to flashing full files :-/ 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. 23022. Not easy to read, but acceptable. But the optional arguments make it hard to guess what the user intended, e.g. I think currently it would tell the user to specify files for each region even if he maybe just forgot to specify the full flash-chip file. Having different syntaxes for each case evades this problem. -- To view, visit https://review.coreboot.org/c/flashrom/+/30979 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-Change-Id: Idfba11ec9991aac423b07f68f7dc45e7bebbb06b Gerrit-Change-Number: 30979 Gerrit-PatchSet: 2 Gerrit-Owner: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz> Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-Comment-Date: Thu, 17 Jan 2019 20:05:00 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: David Hendricks <david.hendricks@gmail.com> Gerrit-MessageType: comment