CBFS: Change the signature of cbfs_decompress.
Instead of returning 0 on success and -1 on error, return the decompressed size of the data on success and 0 on error. The decompressed size is useful information to have that was being thrown away in that function. Change-Id: If787201aa61456b1e47feaf3a0071c753fa299a3 Signed-off-by: Gabe Black <gabeblack@chromium.org> Reviewed-on: http://review.coreboot.org/3578 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
committed by
Patrick Georgi
parent
f31eacca62
commit
0c605a5a6c
@ -66,8 +66,8 @@ static void vboot_run_stub(struct vboot_context *context)
|
||||
|
||||
vboot_region = cbmem_entry_start(vboot_entry);
|
||||
|
||||
if (cbfs_decompress(stage->compression, &stage[1],
|
||||
&vboot_region[rmodule_offset], stage->len)) {
|
||||
if (!cbfs_decompress(stage->compression, &stage[1],
|
||||
&vboot_region[rmodule_offset], stage->len)) {
|
||||
printk(BIOS_DEBUG, "Couldn't decompress vboot stub.\n");
|
||||
goto out;
|
||||
}
|
||||
@ -221,8 +221,8 @@ static void vboot_load_ramstage(struct vboot_handoff *vboot_handoff,
|
||||
printk(BIOS_DEBUG, "Decompressing ramstage @ 0x%p (%d bytes)\n",
|
||||
&ramstage_region[rmodule_offset], stage->memlen);
|
||||
|
||||
if (cbfs_decompress(stage->compression, &stage[1],
|
||||
&ramstage_region[rmodule_offset], stage->len))
|
||||
if (!cbfs_decompress(stage->compression, &stage[1],
|
||||
&ramstage_region[rmodule_offset], stage->len))
|
||||
return;
|
||||
|
||||
if (rmodule_parse(&ramstage_region[rmodule_offset], &ramstage))
|
||||
|
Reference in New Issue
Block a user