Per region file arguments

From flashrom
Revision as of 21:38, 19 January 2018 by Nico (talk | contribs) (Created page with "== Current chromium impl. == Current chromium flashrom implements the syntax like this: [-i <region>[:<file>]]... -r|-w|-v [<filename>] Where '''<filename>''' can be gi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This wiki is retired

Our website is https://www.flashrom.org, instructions on how to add or update documentation are here

All wiki content available in read-only mode at wiki.flashrom.org

Current chromium impl.

Current chromium flashrom implements the syntax like this:

   [-i <region>[:<file>]]... -r|-w|-v [<filename>]

Where <filename> can be given anywhere on the command line (non-positional).

Rules:

  • if no <filename> is given, all -i arguments must specify a <file>
  • For reading:
    • if any -i region:<file> is given along with <filename>, read all included regions into <filename> and all included regions with a <file> specified into the respective file
  • For writing and verifying:
    • if any -i region:<file> is given along with <filename>, the data of -i region:<file> takes precedence
    • regions with files given with -i region:<file> must not overlap

More explicit alternative

   [-i <region>]... (-r|-w|-v [<region>:]<filename>)...

Easier to implement, no optional arguments, no non-positional arguments.

Rules for sanity:

  • combinations of -r/-w/-v are not allowed
  • -r/-w/-v <filename> (i.e. without a <region>) may only be specified once

optional Rules:

  • forbid combinations of -r/-w/-v <filename> without a <region> and with? less flexible but easier to use