1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-30 16:33:41 +02:00

fixup! Add a convenient libflashrom interface

The buffer passed to flashrom_image_write() isn't `const`. It might be
altered for full verification (with mixed contents if a layout is being
used).

Change-Id: Ibd8a9579e5dd859ae03b0deb3042b7035719e5de
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20266
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
This commit is contained in:
Nico Huber 2017-06-19 12:35:24 +02:00 committed by Nico Huber
parent 560111e2ce
commit 1b172f2da5
2 changed files with 2 additions and 2 deletions

View File

@ -2294,7 +2294,7 @@ static void combine_image_by_layout(const struct flashctx *const flashctx,
* containing included regions will be touched.
*
* @param flashctx The context of the flash chip.
* @param buffer Source buffer to read image from.
* @param buffer Source buffer to read image from (may be altered for full verification).
* @param buffer_len Size of source buffer in bytes.
* @return 0 on success,
* 4 if buffer_len doesn't match the size of the flash chip,

View File

@ -59,7 +59,7 @@ void flashrom_flag_set(struct flashrom_flashctx *, enum flashrom_flag, bool valu
bool flashrom_flag_get(const struct flashrom_flashctx *, enum flashrom_flag);
int flashrom_image_read(struct flashrom_flashctx *, void *buffer, size_t buffer_len);
int flashrom_image_write(struct flashrom_flashctx *, const void *buffer, size_t buffer_len);
int flashrom_image_write(struct flashrom_flashctx *, void *buffer, size_t buffer_len);
int flashrom_image_verify(struct flashrom_flashctx *, const void *buffer, size_t buffer_len);
struct flashrom_layout;