[PATCHv2 1/2] serve_image: adjust classificator and type for printf

Andy Shevchenko ext-andriy.shevchenko at nokia.com
Mon Apr 18 04:31:47 EDT 2011


The argument type of printf is __off64_t, meanwhile the classificator is "%ld".

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko at nokia.com>
---
 serve_image.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/serve_image.c b/serve_image.c
index f8f28a1..d86e372 100644
--- a/serve_image.c
+++ b/serve_image.c
@@ -126,8 +126,9 @@ int main(int argc, char **argv)
 	}
 
 	if (st.st_size % erasesize) {
-		fprintf(stderr, "Image size %ld bytes is not a multiple of erasesize %d bytes\n",
-			st.st_size, erasesize);
+		fprintf(stderr, "Image size %llu bytes is not a multiple of "
+				"erasesize %d bytes\n",
+				(unsigned long long)st.st_size, erasesize);
 		exit(1);
 	}
 	image = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, rfd, 0);
-- 
1.6.3.3




More information about the linux-mtd mailing list