Changes the 'dup' output format to include the size of each duplicate file.

This commit is contained in:
Andrea Mazzoleni 2013-06-22 16:31:00 +02:00
parent 6a23acec2f
commit 27c5829d5a
2 changed files with 3 additions and 2 deletions

View file

@ -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
==========

4
dup.c
View file

@ -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 {