Edward O'Callaghan has uploaded this change for review.
flashrom.c: Make {read,write}_buf_from_include_args() public
This allows for moving all the do_*() helper functions
use for the cli from flashrom.c within static local functions
in cli_classic.c
BUG=b:208132085
TEST=`make`
Change-Id: Ia0abec655a682ca449d0e8ba620886a2d616b86d
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
---
M flash.h
M flashrom.c
2 files changed, 4 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/69/60069/1
diff --git a/flash.h b/flash.h
index 134d7d3..ab58478 100644
--- a/flash.h
+++ b/flash.h
@@ -349,7 +349,9 @@
void list_programmers_linebreak(int startcol, int cols, int paren);
int selfcheck(void);
int read_buf_from_file(unsigned char *buf, unsigned long size, const char *filename);
+int read_buf_from_include_args(const struct flashctx *const flash, unsigned char *buf);
int write_buf_to_file(const unsigned char *buf, unsigned long size, const char *filename);
+int write_buf_to_include_args(const struct flashctx *const flash, unsigned char *buf);
int prepare_flash_access(struct flashctx *, bool read_it, bool write_it, bool erase_it, bool verify_it);
void finalize_flash_access(struct flashctx *);
int do_read(struct flashctx *, const char *filename);
diff --git a/flashrom.c b/flashrom.c
index c2bf9d8..a8f1b81 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -933,7 +933,7 @@
* @param buf Chip-sized buffer to write data to
* @return 0 on success
*/
-static int read_buf_from_include_args(const struct flashctx *const flash,
+int read_buf_from_include_args(const struct flashctx *const flash,
unsigned char *buf)
{
const struct flashrom_layout *const layout = get_layout(flash);
@@ -1030,7 +1030,7 @@
* @param buf Chip-sized buffer to read data from
* @return 0 on success
*/
-static int write_buf_to_include_args(const struct flashctx *const flash,
+int write_buf_to_include_args(const struct flashctx *const flash,
unsigned char *buf)
{
const struct flashrom_layout *const layout = get_layout(flash);
To view, visit change 60069. To unsubscribe, or for help writing mail filters, visit settings.