From 8361cf46dd59aa1238ca020f36d168c4b685b9f1 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Tue, 2 Aug 2016 07:55:49 -0300 Subject: [PATCH] Fix for 64-bit platforms. On 64-bit platforms, size_t has 64 bits. So load address was overwritten when changing the kernel size, which broke boot of the generated images. Signed-off-by: Thadeu Lima de Souza Cascardo --- bootimg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootimg.c b/bootimg.c index cacd658..7e38e0a 100644 --- a/bootimg.c +++ b/bootimg.c @@ -25,7 +25,7 @@ #include #include -static int dump_or_load(int fd, size_t *len, int pgsz, char *fname, int dump) +static int dump_or_load(int fd, uint32_t *len, int pgsz, char *fname, int dump) { int cfd; char *page; @@ -92,12 +92,12 @@ out: return -EINVAL; } -static int dump(int fd, size_t len, int pgsz, char *fname) +static int dump(int fd, uint32_t len, int pgsz, char *fname) { return dump_or_load(fd, &len, pgsz, fname, 1); } -static int load(int fd, size_t *len, int pgsz, char *fname) +static int load(int fd, uint32_t *len, int pgsz, char *fname) { return dump_or_load(fd, len, pgsz, fname, 0); } -- 2.20.1