Attention is currently required from: Evan Benn.
2 comments:
File util/flashrom_tester/flashrom/src/cmd.rs:
Patch Set #4, Line 82: // an operation must provide a file or a region.file or both.
I think you are saying some things I get and some that I dont, I have had another attempt PTAL. […]
It's moving in a direction that makes more sense; comments on the changes.
File util/flashrom_tester/flashrom/src/cmd.rs:
Patch Set #6, Line 73: Option
This still seems weird, in that it's required to specify either a file or a region with some file. It seems like we want to express these cases:
* One file, entire chip
* One file, part of chip
* Multiple files, one per part of chip
..which can be translated to a type in a pretty straighforward way once we've enumerated the options that make sense:
```
enum FileIoMapping {
/// Operate on the entire flash, mapped to an entire file.
CompleteImage(Path),
/// Operate on the named flash regions only, mapped to the corresponding portions of
/// the given file.
PartialImage(Path, &[&str]),
/// Operate on the named flash regions, mapping each to a single file.
FilePerRegion(&[(Path, &str)]),
}
```
It could also then move the layout into the variants that operate on regions, to capture that layout only matters if you're not operating on the complete flash.
To view, visit change 71973. To unsubscribe, or for help writing mail filters, visit settings.