From 27c5829d5a7a30d84458b44140e30f7e442a0de3 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sat, 22 Jun 2013 16:31:00 +0200 Subject: [PATCH] Changes the 'dup' output format to include the size of each duplicate file. --- HISTORY | 1 + dup.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index e88e7fc7..ab23c380 100644 --- a/HISTORY +++ b/HISTORY @@ -14,6 +14,7 @@ SnapRAID HISTORY There is also the undocumented --test-skip-lock to avoid to check it. * Automatically ignores, with warning, mount points inside the array directory tree. + * Changes the 'dup' output format to include the size of each duplicate file. 3.1 2013/5 ========== diff --git a/dup.c b/dup.c index 1480967c..3a3fd389 100644 --- a/dup.c +++ b/dup.c @@ -126,8 +126,8 @@ void state_dup(struct snapraid_state* state) if (state->gui) { fprintf(stdlog, "dup:%s:%s:%s:%s:%"PRIu64": dup\n", disk->name, file->sub, dup->disk->name, dup->file->sub, dup->file->size); } else { - printf("Duplicate '%s%s'\n", disk->dir, file->sub); - printf("of '%s%s'\n", dup->disk->dir, dup->file->sub); + printf("%"PRIu64" '%s%s'\n", file->size / (1024*1024), disk->dir, file->sub); + printf("dup '%s%s'\n", dup->disk->dir, dup->file->sub); } hash_free(hash); } else {