diff options
author | Sam McNally <sammc@chromium.org> | 2022-10-18 20:31:28 +1100 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-11-17 09:24:43 +0000 |
commit | 57318f0ff4e47394e767d8752cd04a0eb7a89164 (patch) | |
tree | 224d4fd0cf846441486afcbefd7ac8eabda196a6 /futility | |
parent | 5b6985240bc5e673ec2a744bedda7e22583cea77 (diff) | |
download | vboot-57318f0ff4e47394e767d8752cd04a0eb7a89164.tar.gz |
host/lib: Add flashrom_read_region() to read just the requested region
The region parameter to flashrom_read_image() is essentially unusable in
isolation since it reads just the requested region into a buffer sized
to the entire flash, at the offset of the region within the flash.
Remove its unused region parameter and split the functionality of
requesting a region into flashrom_read_region() which stores just the
requested region into a buffer sized to the region.
BUG=b:253966060
TEST=futility update --detect-model -a <archive> works as expected
BRANCH=None
Signed-off-by: Sam McNally <sammc@chromium.org>
Change-Id: Ibf6c152dd42fbc99c1742fb077bc6aa35feeed08
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3965583
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Diffstat (limited to 'futility')
-rw-r--r-- | futility/updater_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/futility/updater_utils.c b/futility/updater_utils.c index a41c4038..978936fa 100644 --- a/futility/updater_utils.c +++ b/futility/updater_utils.c @@ -672,7 +672,7 @@ static int read_flash(struct flashrom_params *params, if (get_config_quirk(QUIRK_EXTERNAL_FLASHROM, cfg)) return external_flashrom(FLASH_READ, params, &cfg->tempfiles); - return flashrom_read_image(params->image, NULL, params->verbose); + return flashrom_read_image(params->image, params->verbose); } static int write_flash(struct flashrom_params *params, |