diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2015-05-31 14:57:35 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-06-04 03:02:57 -0600 |
commit | 6c4247e98eb3b1bf7ec19b61915c803db5670ad0 (patch) | |
tree | 7327ff07d89283dcaa1e1991fdbdf82fd4ccd685 /tools/ifdtool.c | |
parent | 4be2f42bbc8171eae930db37f370f10779c5b02c (diff) | |
download | u-boot-imx-6c4247e98eb3b1bf7ec19b61915c803db5670ad0.zip u-boot-imx-6c4247e98eb3b1bf7ec19b61915c803db5670ad0.tar.gz u-boot-imx-6c4247e98eb3b1bf7ec19b61915c803db5670ad0.tar.bz2 |
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>
Diffstat (limited to 'tools/ifdtool.c')
-rw-r--r-- | tools/ifdtool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/ifdtool.c b/tools/ifdtool.c index 590ccc9..1d61df1 100644 --- a/tools/ifdtool.c +++ b/tools/ifdtool.c @@ -462,7 +462,7 @@ static int write_regions(char *image, int size) if (ret) return ret; dump_region(i, frba); - if (region.size == 0) + if (region.size <= 0) continue; region_fd = open(region_filename(i), O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | |