From: Felix Fietkau Date: Sat, 31 May 2014 12:44:27 +0000 (+0200) Subject: snapshot: use cross-platform macros for fprintf on 64-bit values to fix build for... X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b791127ca06d3e222e91418080ef061eabb22255;p=oweals%2Ffstools.git snapshot: use cross-platform macros for fprintf on 64-bit values to fix build for 64 bit targets Signed-off-by: Felix Fietkau --- 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");