From patchwork Fri Aug 14 08:39:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/4] Libflashrom: Fix libflashrom compilation Date: Fri, 14 Aug 2015 08:39:36 -0000 From: =?utf-8?q?=C5=81ukasz_Dmitrowski_=3Clukasz=2Edmitrowski=40gmail=2Ecom?= =?utf-8?q?=3E?= X-Patchwork-Id: 4314 Message-Id: <55CDA948.4070006@gmail.com> To: flashrom@flashrom.org, coreboot@coreboot.org Anton Kochkov's fixes for libflashrom compilation. Signed-off-by: Lukasz Dmitrowski --- libflashrom.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libflashrom.c b/libflashrom.c index 507fee9..c96a2e9 100644 --- a/libflashrom.c +++ b/libflashrom.c @@ -187,12 +187,12 @@ int fl_flash_probe(fl_flashctx_t **const flashctx, const char *const chip_name) return 1; memset(*flashctx, 0, sizeof(**flashctx)); - for (i = 0; i < registered_programmer_count; ++i) { + for (i = 0; i < registered_master_count; ++i) { int flash_idx = -1; - if (!ret || (flash_idx = probe_flash(®istered_programmers[i], 0, *flashctx, 0)) != -1) { + if (!ret || (flash_idx = probe_flash(®istered_masters[i], 0, *flashctx, 0)) != -1) { ret = 0; /* We found one chip, now check that there is no second match. */ - if (probe_flash(®istered_programmers[i], flash_idx + 1, &second_flashctx, 0) != -1) { + if (probe_flash(®istered_masters[i], flash_idx + 1, &second_flashctx, 0) != -1) { ret = 3; break; } @@ -370,7 +370,7 @@ int fl_image_write(fl_flashctx_t *const flashctx, void *const buffer, const size goto _free_out; } - handle_romentries(flashctx, oldcontents, newcontents); + build_new_image(flashctx, oldcontents, newcontents); if (erase_and_write_flash(flashctx, oldcontents, newcontents)) { msg_cerr("Uh oh. Erase/write failed. Checking if anything changed.\n"); @@ -427,7 +427,7 @@ int fl_image_verify(fl_flashctx_t *const flashctx, void *const buffer, const siz goto _free_out; } - handle_romentries(flashctx, oldcontents, newcontents); + build_new_image(flashctx, oldcontents, newcontents); msg_cinfo("Verifying flash... ");