From 7c9bf5f5f29b9c67df765d87f8519b856382c710 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Mon, 8 Oct 2012 19:20:03 +0200 Subject: [PATCH] When printing inodes ensure to use 64 bits conversion in case inode is 32 bit. --- scan.c | 2 +- sync.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scan.c b/scan.c index 9e95d47a..02d88177 100644 --- a/scan.c +++ b/scan.c @@ -164,7 +164,7 @@ static void scan_file(struct snapraid_scan* scan, struct snapraid_state* state, printf("warning: Ignored hardlink '%s%s'\n", disk->dir, sub); return; } else { - fprintf(stderr, "Internal inode '%"PRIu64"' inconsistency for file '%s%s'\n", st->st_ino, disk->dir, sub); + fprintf(stderr, "Internal inode '%"PRIu64"' inconsistency for file '%s%s'\n", (uint64_t)st->st_ino, disk->dir, sub); exit(EXIT_FAILURE); } } diff --git a/sync.c b/sync.c index 584ceb77..afdb84a2 100644 --- a/sync.c +++ b/sync.c @@ -213,7 +213,7 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari || STAT_NSEC(&handle[j].st) != block_file_get(block)->mtime_nsec) fprintf(stderr, "Unexpected time change at file '%s'.\n", handle[j].path); else - fprintf(stderr, "Unexpected inode change from %"PRIu64" to %"PRIu64" at file '%s'.\n", block_file_get(block)->inode, handle[j].st.st_ino, handle[j].path); + fprintf(stderr, "Unexpected inode change from %"PRIu64" to %"PRIu64" at file '%s'.\n", block_file_get(block)->inode, (uint64_t)handle[j].st.st_ino, handle[j].path); fprintf(stderr, "WARNING! You cannot modify files during a sync. Rerun the sync command when finished.\n"); ++unrecoverable_error;