From 4de512018ba7d57f1672be21c7459281f7c97514 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Wed, 19 Jul 2017 16:39:22 +0200 Subject: dfu: allow dfu read on partition greater than 2GB solve issue on get_medium_size() function the detection of error is a simple test < 0 but for ARM platform, long is 32bits and 2GB = 0x80000000 is seen as error. I solve the issue by changing the prototype fo the function to separate size and result. This patch prepare the next patch with size change to u64. Signed-off-by: Patrick Delaunay --- include/dfu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/dfu.h') diff --git a/include/dfu.h b/include/dfu.h index f39d3f1171..5b621b577b 100644 --- a/include/dfu.h +++ b/include/dfu.h @@ -110,7 +110,7 @@ struct dfu_entity { struct sf_internal_data sf; } data; - long (*get_medium_size)(struct dfu_entity *dfu); + int (*get_medium_size)(struct dfu_entity *dfu, long *size); int (*read_medium)(struct dfu_entity *dfu, u64 offset, void *buf, long *len); -- cgit v1.2.3