summaryrefslogtreecommitdiffstats
path: root/flash.h
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2021-12-13 12:30:03 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2022-01-22 00:04:00 +0000
commit7a2d7efd83ff50507192bba01dbad1a411e22b25 (patch)
tree1151de0c68e2f4367e833772f26661fa84ed7298 /flash.h
parentf136a2a69c649c785669496d8bbd04b900724e77 (diff)
downloadflashrom-7a2d7efd83ff50507192bba01dbad1a411e22b25.tar.gz
flashrom-7a2d7efd83ff50507192bba01dbad1a411e22b25.tar.bz2
flashrom-7a2d7efd83ff50507192bba01dbad1a411e22b25.zip
cli_classic.c: Convert do_erase() to libflashrom call
Inline emergency_help_message() to cli_classic call site. This leaves do_erase() a redudant wrapper and moves us a step closer to cli_classic as a pure libflashrom user by using flashrom_flash_erase(). BUG=b:208132085 TEST=`flashrom -E` Change-Id: I8566164e7dbad69cf478b24208014f10fb99e4d0 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/60068 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Diffstat (limited to 'flash.h')
-rw-r--r--flash.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/flash.h b/flash.h
index 391a2d42f..11e638921 100644
--- a/flash.h
+++ b/flash.h
@@ -344,6 +344,7 @@ int probe_flash(struct registered_master *mst, int startchip, struct flashctx *f
int read_flash_to_file(struct flashctx *flash, const char *filename);
int verify_range(struct flashctx *flash, const uint8_t *cmpbuf, unsigned int start, unsigned int len);
int need_erase(const uint8_t *have, const uint8_t *want, unsigned int len, enum write_granularity gran, const uint8_t erased_value);
+void emergency_help_message(void);
void print_version(void);
void print_buildinfo(void);
void print_banner(void);
@@ -355,7 +356,6 @@ int prepare_flash_access(struct flashctx *, bool read_it, bool write_it, bool er
void finalize_flash_access(struct flashctx *);
int do_read(struct flashctx *, const char *filename);
int do_extract(struct flashctx *);
-int do_erase(struct flashctx *);
int do_write(struct flashctx *, const char *const filename, const char *const referencefile);
int do_verify(struct flashctx *, const char *const filename);
int register_chip_restore(chip_restore_fn_cb_t func, struct flashctx *flash, uint8_t status);