fix return value checks of cbfstool's writerom

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5644 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Stefan Reinauer
2010-06-24 13:37:59 +00:00
committed by Stefan Reinauer
parent 980a69b8c2
commit 9bb0438535
3 changed files with 21 additions and 6 deletions

View File

@@ -83,7 +83,8 @@ static int cbfs_add(int argc, char **argv)
cbfsfile = create_cbfs_file(cbfsname, filedata, &filesize, type, &base);
if (add_file_to_cbfs(cbfsfile, filesize, base))
return 1;
writerom(romname, rom, romsize);
if (writerom(romname, rom, romsize))
return 1;
return 0;
}
@@ -131,7 +132,8 @@ static int cbfs_add_payload(int argc, char **argv)
CBFS_COMPONENT_PAYLOAD, &base);
if (add_file_to_cbfs(cbfsfile, filesize, base))
return 1;
writerom(romname, rom, romsize);
if (writerom(romname, rom, romsize))
return 1;
return 0;
}
@@ -180,7 +182,8 @@ static int cbfs_add_stage(int argc, char **argv)
if (add_file_to_cbfs(cbfsfile, filesize, base))
return 1;
writerom(romname, rom, romsize);
if (writerom(romname, rom, romsize))
return 1;
return 0;
}