From f3f3a208048eac5f8b5752a17ebcd44db9230fd8 Mon Sep 17 00:00:00 2001 From: Richard Genoud Date: Wed, 12 Sep 2012 16:38:34 +0200 Subject: consistency between u_int32_t / off_t / off64_t We should use the off_t type instead of off64_t or u_int32_t as its length is controlled by the WITHOUT_LARGEFILE flag. Signed-off-by: Richard Genoud Signed-off-by: Artem Bityutskiy --- ftl_check.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ftl_check.c') diff --git a/ftl_check.c b/ftl_check.c index 5e75e6a..6d84785 100644 --- a/ftl_check.c +++ b/ftl_check.c @@ -53,6 +53,7 @@ #include #include +#include "common.h" #if __BYTE_ORDER == __LITTLE_ENDIAN # define TO_LE32(x) (x) @@ -85,7 +86,8 @@ static void check_partition(int fd) { mtd_info_t mtd; erase_unit_header_t hdr, hdr2; - u_int i, j, nbam, *bam; + off_t i; + u_int j, nbam, *bam; int control, data, free, deleted; /* Get partition size, block size */ @@ -142,7 +144,7 @@ static void check_partition(int fd) perror("read failed"); break; } - printf("\nErase unit %d:\n", i); + printf("\nErase unit %"PRIdoff_t":\n", i); if ((hdr2.FormattedSize != hdr.FormattedSize) || (hdr2.NumEraseUnits != hdr.NumEraseUnits) || (hdr2.SerialNumber != hdr.SerialNumber)) -- cgit v1.2.3