From 2ae30430bc4b8c8ea88a33fc1683604526281993 Mon Sep 17 00:00:00 2001 From: Bernhard Nortmann Date: Tue, 25 Oct 2016 20:56:43 +0200 Subject: [PATCH] fel: Minor fixup - rename "progress" to "callback" for clarity This commit renames the function pointer of type progress_cb_t for file_upload(). That might help to avoid potential confusion with other routines that use a boolean "progress" parameter to indicate whether progress information is desired (at all). Signed-off-by: Bernhard Nortmann --- fel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fel.c b/fel.c index bda6a7c..60ca401 100644 --- a/fel.c +++ b/fel.c @@ -1471,7 +1471,7 @@ static bool is_uEnv(void *buffer, size_t size) /* private helper function, gets used for "write*" and "multi*" transfers */ static unsigned int file_upload(libusb_device_handle *handle, size_t count, - size_t argc, char **argv, progress_cb_t progress) + size_t argc, char **argv, progress_cb_t callback) { if (argc < count * 2) { fprintf(stderr, "error: too few arguments for uploading %zu files\n", @@ -1485,14 +1485,14 @@ static unsigned int file_upload(libusb_device_handle *handle, size_t count, for (i = 0; i < count; i++) size += file_size(argv[i * 2 + 1]); - progress_start(progress, size); /* set total size and progress callback */ + progress_start(callback, size); /* set total size and progress callback */ /* now transfer each file in turn */ for (i = 0; i < count; i++) { void *buf = load_file(argv[i * 2 + 1], &size); if (size > 0) { uint32_t offset = strtoul(argv[i * 2], NULL, 0); - aw_write_buffer(handle, buf, offset, size, progress != NULL); + aw_write_buffer(handle, buf, offset, size, callback != NULL); /* If we transferred a script, try to inform U-Boot about its address. */ if (get_image_type(buf, size) == IH_TYPE_SCRIPT)