UPSTREAM: ifdtool: don't write unused regions into a layout file
flashrom treats them as invalid because start > end. BUG=None BRANCH=None TEST=None Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-on: https://review.coreboot.org/16936 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com> Change-Id: I1c8b4563094823ebd9b1193b91e7b4a748955228 Reviewed-on: https://chromium-review.googlesource.com/396254 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
cf5bd6f310
commit
3d9d0bfe53
1 changed files with 5 additions and 0 deletions
|
|
@ -296,6 +296,11 @@ static void dump_frba_layout(frba_t * frba, char *layout_fname)
|
|||
}
|
||||
|
||||
for (i = 0; i < max_regions; i++) {
|
||||
region_t region = get_region(frba, i);
|
||||
/* is region invalid? */
|
||||
if (region.size < 1)
|
||||
continue;
|
||||
|
||||
dump_region_layout(buf, bufsize, i, frba);
|
||||
if (write(layout_fd, buf, strlen(buf)) < 0) {
|
||||
perror("Could not write to file");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue