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>
This commit is contained in:
parent
4be2f42bbc
commit
6c4247e98e
1 changed files with 1 additions and 1 deletions
|
@ -462,7 +462,7 @@ static int write_regions(char *image, int size)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
dump_region(i, frba);
|
dump_region(i, frba);
|
||||||
if (region.size == 0)
|
if (region.size <= 0)
|
||||||
continue;
|
continue;
|
||||||
region_fd = open(region_filename(i),
|
region_fd = open(region_filename(i),
|
||||||
O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR |
|
O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR |
|
||||||
|
|
Loading…
Reference in a new issue