#include <libgen.h>
#include <unistd.h>
#include <string.h>
+#include <inttypes.h>
#include <libubox/list.h>
#include <libubox/blob.h>
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);
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");