From c4ded03ef608be37db105200010d2f3f88195bd6 Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Tue, 29 May 2018 15:30:40 +0000 Subject: fastboot: Refactor fastboot_okay/fail to take response Add the response string as a parameter to fastboot_okay/fail, instead of modifying a global, to match the contract expected by the AOSP U-Boot code. Signed-off-by: Alex Kiernan Reviewed-by: Joe Hershberger --- include/fastboot.h | 4 ++-- include/fb_mmc.h | 4 ++-- include/fb_nand.h | 4 ++-- include/image-sparse.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/fastboot.h b/include/fastboot.h index 009f1a72e10..ed52daeb1b8 100644 --- a/include/fastboot.h +++ b/include/fastboot.h @@ -15,7 +15,7 @@ /* The 64 defined bytes plus \0 */ #define FASTBOOT_RESPONSE_LEN (64 + 1) -void fastboot_fail(const char *reason); -void fastboot_okay(const char *reason); +void fastboot_fail(const char *reason, char *response); +void fastboot_okay(const char *reason, char *response); #endif /* _FASTBOOT_H_ */ diff --git a/include/fb_mmc.h b/include/fb_mmc.h index a2d7c4895fa..39a960cc9d7 100644 --- a/include/fb_mmc.h +++ b/include/fb_mmc.h @@ -4,5 +4,5 @@ */ void fb_mmc_flash_write(const char *cmd, void *download_buffer, - unsigned int download_bytes); -void fb_mmc_erase(const char *cmd); + unsigned int download_bytes, char *response); +void fb_mmc_erase(const char *cmd, char *response); diff --git a/include/fb_nand.h b/include/fb_nand.h index 3daae8c4ca4..2c92a4eb50f 100644 --- a/include/fb_nand.h +++ b/include/fb_nand.h @@ -5,5 +5,5 @@ */ void fb_nand_flash_write(const char *cmd, void *download_buffer, - unsigned int download_bytes); -void fb_nand_erase(const char *cmd); + unsigned int download_bytes, char *response); +void fb_nand_erase(const char *cmd, char *response); diff --git a/include/image-sparse.h b/include/image-sparse.h index f39dc16617f..234c237b845 100644 --- a/include/image-sparse.h +++ b/include/image-sparse.h @@ -23,7 +23,7 @@ struct sparse_storage { lbaint_t blk, lbaint_t blkcnt); - void (*mssg)(const char *str); + void (*mssg)(const char *str, char *response); }; static inline int is_sparse_image(void *buf) @@ -38,4 +38,4 @@ static inline int is_sparse_image(void *buf) } int write_sparse_image(struct sparse_storage *info, const char *part_name, - void *data); + void *data, char *response); -- cgit v1.2.3