There are still some issues when it comes to the updated behaviour due
to that http://crbug.com/263495
10 comments:
Patch Set #7, Line 227: write
spurious
For write operations, files specified using
.B "\-i"
take precedence over content from the argument to
.B "\-w."
That's no more true. -i and -w filenames are mutually exclusive, right?
Patch Set #7, Line 252: .B " flashrom \-p prog \-l <layout> \-i foo:foo.bin -i bar:bar.bin -w rom.bin
Hmmm, just realized that this doesn't work. The -i files are just ignored
when -w gets a file passed.
I'd be fine if you document the final behaviour here. But maybe it's yet
easier to squash the two commits...
if (!entry->included || !entry->file)
continue;
Optionally:
if (!entry->included)
continue;
if (!entry->file) {
msg_gerr("Error: No image file given for region \"%s\".\n", entry->name);
return 1;
}
I know this is already covered in the next commit for the CLI, but I
would feel much better if the code here looks consistent.
+ entry->start ?
Patch Set #7, Line 1464: const char *filename)
Should fit a single line.
Patch Set #7, Line 2647: * processed and merged into newcontents since -i files take priority.
This comment still makes no sense to me. I'd guess it was
written before the if / else decision was introduced.
i + 1 ?
Patch Set #7, Line 244: continue;
Not needed if we start with `j > i`.
for (i = 0; i < layout.num_entries; i++) {
free(layout.entries[i].file);
layout.entries[i].file = NULL;
layout.entries[i].included = 0;
}
layout.num_entries = 0;
This should actually be done in flashrom_layout_release() (before
the `if (layout == get_global_layout())` check).
It's a bit ugly atm, because nobody took the time yet, to untangle
the CLI parts and the static layout struct here. Hmmm, now it
doesn't look like much work: read_romlayout() would allocate a new
layout, normalize_romentries() should work on the layout linked to
the `flashctx`. Everything else doesn't seem to use the static
struct.
To view, visit change 23021. To unsubscribe, or for help writing mail filters, visit settings.