From 045fd8b13dc7b08a309043c28fc764c8fd2fde14 Mon Sep 17 00:00:00 2001 From: AKASHI Takahiro Date: Thu, 29 Oct 2020 13:47:41 +0900 Subject: dfu: rename dfu_tftp_write() to dfu_write_by_name() This function is essentially independent from tftp, and will also be utilised in implementing UEFI capsule update in a later commit. So just give it a more generic name. In addition, a new configuration option, CONFIG_DFU_WRITE_ALT, was introduced so that the file will be compiled with different options, particularly one added in a later commit. Signed-off-by: AKASHI Takahiro Reviewed-by: Tom Rini --- common/update.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/update.c b/common/update.c index 36b6b75..3994677 100644 --- a/common/update.c +++ b/common/update.c @@ -324,8 +324,9 @@ got_update_file: } } else if (fit_image_check_type(fit, noffset, IH_TYPE_FIRMWARE)) { - ret = dfu_tftp_write(fit_image_name, update_addr, - update_size, interface, devstring); + ret = dfu_write_by_name(fit_image_name, update_addr, + update_size, interface, + devstring); if (ret) return ret; } -- cgit v1.1