Commit 6c4247e98eb3b1bf7ec19b61915c803db5670ad0

Authored by Bin Meng
Committed by Simon Glass
1 parent 4be2f42bbc

tools: ifdtool: Do not write region while its size is negative

We should ignore those regions whose size is negative. These are
typically optional and unused regions (like GbE and platform data).

Change-Id: I65ad01746144604a1dc0588b617af21f2722ebbf
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -462,7 +462,7 @@
462 462 if (ret)
463 463 return ret;
464 464 dump_region(i, frba);
465   - if (region.size == 0)
  465 + if (region.size <= 0)
466 466 continue;
467 467 region_fd = open(region_filename(i),
468 468 O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR |