From b791127ca06d3e222e91418080ef061eabb22255 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 31 May 2014 14:44:27 +0200 Subject: [PATCH] snapshot: use cross-platform macros for fprintf on 64-bit values to fix build for 64 bit targets Signed-off-by: Felix Fietkau --- snapshot.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/snapshot.c b/snapshot.c index e817e69..a7952f3 100644 --- a/snapshot.c +++ b/snapshot.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -149,7 +150,7 @@ snapshot_read(int argc, char **argv) if (argc > 2) { block = atoi(argv[2]); if (block >= (v->size / v->block_size)) { - fprintf(stderr, "invalid block %d > %llu\n", block, v->size / v->block_size); + fprintf(stderr, "invalid block %d > %" PRId64 "\n", block, v->size / v->block_size); goto out; } snprintf(file, sizeof(file), "/tmp/snapshot/block%d.tar.gz", block); @@ -177,7 +178,7 @@ snapshot_info(void) if (!v) return -1; - fprintf(stderr, "sectors:\t%llu, block_size:\t%dK\n", v->size / v->block_size, v->block_size / 1024); + fprintf(stderr, "sectors:\t%" PRId64 ", block_size:\t%dK\n", v->size / v->block_size, v->block_size / 1024); do { if (volume_read(v, &hdr, block * v->block_size, sizeof(struct file_header))) { fprintf(stderr, "scanning for next free block failed\n"); -- 2.30.2