Attention is currently required from: Nico Huber, David Hendricks, Angel Pons, Anastasia Klimchuk, Nikolai Artemiev. 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:
And then you want to add a `-V` but miss the dash, it would still be accepted:
$ flashrom -p prog --ifd -i bios:bios.bin -r V
It's not very bad. IIRC, with the non-positional argument one could do much funnier things.
Agree here! At least it seems to me that it just a concern for --read (which makes it non-dangerous), since for the other two (-w/-v) it would be a lot of bad luck to have a filename called V (still possible) while making the typo.
On the wiki[1], I once came up with this:
[-i <region>]... (-r|-w|-v [<region>:]<filename>)...
I think the complication with this approach is to support multiple file regions in a single operation. We would have to enforce multiple -r without the possibility of mixes between -r/-w/-v... Also, it means that we would have to move away form -i <region>:<filename> (or as you suggested bellow - not document it). Furthermore -i would only make sense if there is a chip size operation since otherwise is already embedded on the -r/-w/-v option. As an example of something that would not make much sense: $ flashrom -i region1 -r region2:file # excluding a -r chip_file
[1] https://flashrom.org/Per_region_file_arguments#More_explicit_alternative
I probably should have clicked the link before starting replying as my concerns are documented there :) -- 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: Anastasia Klimchuk <aklm@chromium.org> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz> Gerrit-Reviewer: Carl-Daniel Hailfinger <hailfinger@gmail.com> Gerrit-Reviewer: Daniel Campello <campello@chromium.org> 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: Nikolai Artemiev <nartemiev@google.com> Gerrit-Reviewer: Paul Menzel <paulepanter@mailbox.org> Gerrit-Reviewer: Stefan T <stefan.tauner@gmx.at> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-Attention: Nico Huber <nico.h@gmx.de> Gerrit-Attention: David Hendricks <david.hendricks@gmail.com> Gerrit-Attention: Angel Pons <th3fanbus@gmail.com> Gerrit-Attention: Anastasia Klimchuk <aklm@chromium.org> Gerrit-Attention: Nikolai Artemiev <nartemiev@google.com> Gerrit-Comment-Date: Sat, 08 May 2021 14:09:42 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Nico Huber <nico.h@gmx.de> Comment-In-Reply-To: Daniel Campello <campello@chromium.org> Gerrit-MessageType: comment