[PATCH v4] tools: copyfile: use 64k instead of 512 buffer

2024-04-09 Thread Ahelenia Ziemiańska
buffer size to a macro. Signed-off-by: Ahelenia Ziemiańska --- tools/fit_common.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/fit_common.c b/tools/fit_common.c index 2d417d47..d1cde16c 100644 --- a/tools/fit_common.c +++ b/tools/fit_common.c @@ -23,6

[PATCH v3] tools: copyfile: use 64k instead of 512 buffer

2024-03-21 Thread Ahelenia Ziemiańska
buffer size to a constant. Signed-off-by: Ahelenia Ziemiańska Reviewed-by: Dragan Simic --- On Thu, Mar 21, 2024 at 08:49:52PM +0100, Dragan Simic wrote: > On 2024-03-21 19:29, Ahelenia Ziemiańska wrote: > > This is a trivial but significant optimisation: > s/optimisation/optimization/

[PATCH v2] tools: open FIT image read-only

2024-03-21 Thread Ahelenia Ziemiańska
. Link: https://bugs.debian.org/1063097 Signed-off-by: Ahelenia Ziemiańska Reviewed-by: Dragan Simic --- tools/fit_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/fit_image.c b/tools/fit_image.c index beef1fa8..0fccfbb4 100644 --- a/tools/fit_image.c +++ b/tools

[PATCH v2] tools: copyfile: use 64k instead of 512 buffer

2024-03-21 Thread Ahelenia Ziemiańska
buffer size to a macro. Signed-off-by: Ahelenia Ziemiańska Reviewed-by: Dragan Simic --- tools/fit_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/fit_common.c b/tools/fit_common.c index 2d417d47..1df4785c 100644 --- a/tools/fit_common.c +++ b/tools/fit_co

[PATCH] tools: copyfile: use 64k instead of 512 buffer

2024-03-20 Thread Ahelenia Ziemiańska
13M size ranges, so there's no need to introduce #if __linux__ while((size = sendfile(fd_dst, fd_src, NULL, 128 * 1024 * 1024)) > 0) ; if(size != -1) { ret = 0; goto out; } #endif Signed-off-by: Ahelenia Ziem

[PATCH] tools: open FIT image for reading as O_RDONLY instead of O_RDWR

2024-03-20 Thread Ahelenia Ziemiańska
-by: Ahelenia Ziemiańska --- tools/fit_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/fit_image.c b/tools/fit_image.c index beef1fa8..0fccfbb4 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -137,7 +137,7 @@ static int fdt_property_file(struct