diff options
-rw-r--r-- | cli_classic.c | 4 | ||||
-rw-r--r-- | flashrom.c | 6 | ||||
-rw-r--r-- | include/flash.h | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/cli_classic.c b/cli_classic.c index 991804d1..d0712926 100644 --- a/cli_classic.c +++ b/cli_classic.c @@ -411,7 +411,7 @@ static int do_write(struct flashctx *const flash, const char *const filename, co * ... then update newcontents with contents from files provided to '-i' * args if needed. */ - if (read_buf_from_include_args(flash, newcontents)) + if (read_buf_from_include_args(get_layout(flash), newcontents)) goto _free_ret; if (referencefile) { @@ -445,7 +445,7 @@ static int do_verify(struct flashctx *const flash, const char *const filename) * ... then update newcontents with contents from files provided to '-i' * args if needed. */ - if (read_buf_from_include_args(flash, newcontents)) + if (read_buf_from_include_args(get_layout(flash), newcontents)) goto _free_ret; ret = flashrom_image_verify(flash, newcontents, flash_size); @@ -926,14 +926,12 @@ out: * then this will read file data into the corresponding region in the * supplied buffer. * - * @param flashctx Flash context to be used. + * @param layout The layout to be used. * @param buf Chip-sized buffer to write data to * @return 0 on success */ -int read_buf_from_include_args(const struct flashctx *const flash, - unsigned char *buf) +int read_buf_from_include_args(const struct flashrom_layout *const layout, unsigned char *buf) { - const struct flashrom_layout *const layout = get_layout(flash); const struct romentry *entry = NULL; /* diff --git a/include/flash.h b/include/flash.h index 449ed9d1..3fedb2b6 100644 --- a/include/flash.h +++ b/include/flash.h @@ -423,7 +423,7 @@ void print_banner(void); 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 read_buf_from_include_args(const struct flashrom_layout *const layout, 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); |