dedup

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

commit 0dc1d8bf1eb6a00c244c2b18c8ba62bb4e9ff005
parent 5ae463d1c2cb6c77d735d53ee7e00c3a00b70090
Author: sin <sin@2f30.org>
Date:   Wed, 21 Mar 2018 13:52:25 +0000

Fix verbose messages

Diffstat:
Mdedup.c | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/dedup.c b/dedup.c @@ -161,8 +161,6 @@ flush_cache(void) { struct cache_ent *ent; - if (verbose) - fprintf(stderr, "flushing cache...\n"); RB_FOREACH(ent, cache, &cache_head) { if (!ent->dirty) continue; @@ -359,7 +357,7 @@ rebuild_cache(void) uint64_t i; if (verbose) - fprintf(stderr, "rebuilding cache...\n"); + fprintf(stderr, "rebuilding cache..."); nblks = storefile_nblks(); lseek(cfd, 0, SEEK_SET); for (i = 0; i < nblks; i++) { @@ -372,6 +370,8 @@ rebuild_cache(void) ent->dirty = 1; } flush_cache(); + if (verbose) + fprintf(stderr, "done\n"); } void @@ -381,7 +381,7 @@ init_cache(void) uint64_t i; if (verbose) - fprintf(stderr, "initializing cache...\n"); + fprintf(stderr, "initializing cache..."); nblks = cachefile_nblks(); lseek(cfd, 0, SEEK_SET); for (i = 0; i < nblks; i++) { @@ -393,6 +393,8 @@ init_cache(void) errx(1, "unexpected EOF"); add_cache_ent(ent); } + if (verbose) + fprintf(stderr, "done\n"); } void