dedup

deduplicating backup program
git clone git://git.2f30.org/dedup
Log | Files | Refs | README | LICENSE

commit 25a41212766b069d26bf5a6302ab8244fefa64e7
parent 5f1e1e970f10eb34b5392079a0b98827eb6a8af5
Author: sin <sin@2f30.org>
Date:   Mon,  4 Mar 2019 14:58:43 +0000

Rework prints

Diffstat:
Mdedup.c | 7+------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/dedup.c b/dedup.c @@ -411,8 +411,6 @@ check_cache(struct snapshot *snap, void *arg) blk_desc = &snap->blk_desc[i]; memcpy(&cache_entry.md, blk_desc->md, sizeof(cache_entry.md)); if (lookup_cache_entry(cache, &cache_entry) < 0) { - if (verbose > 0) - fprintf(stderr, "Cache is corrupted\n"); args->ret = -1; return WALK_STOP; } @@ -751,9 +749,6 @@ main(int argc, char *argv[]) if (cache_nr_entries() == snap_hdr.st.nr_blks) { xlseek(ifd, SNAP_HDR_SIZE, SEEK_SET); walk_snap(check_cache, &args); - } else { - if (verbose > 0) - fprintf(stderr, "Cache is corrupted\n"); } if (args.ret != 0) { free_cache(cache); @@ -763,7 +758,7 @@ main(int argc, char *argv[]) err(1, "ftruncate"); if (verbose > 0) - fprintf(stderr, "Rebuilding cache..."); + fprintf(stderr, "Cache is corrupted, rebuilding ..."); xlseek(ifd, SNAP_HDR_SIZE, SEEK_SET); xlseek(cfd, 0, SEEK_SET); walk_snap(rebuild_cache, NULL);