dedup

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

commit 411c06d567b2a7f3569d879fe3706a56449c5073
parent fa3392dd36c100366d2c4d25e5e045d476ff940e
Author: sin <sin@2f30.org>
Date:   Sat,  2 Mar 2019 15:37:28 +0000

Be explicit about fd pos

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

diff --git a/dedup.c b/dedup.c @@ -457,6 +457,8 @@ load_cache(void) uint64_t nr_entries; uint64_t i; + xlseek(cfd, 0, SEEK_SET); + if (fstat(cfd, &sb) < 0) err(1, "fstat"); @@ -494,6 +496,7 @@ init_blk_hdr(void) static void load_blk_hdr(void) { + xlseek(sfd, 0, SEEK_SET); read_blk_hdr(sfd, &blk_hdr); match_ver(blk_hdr.flags); } @@ -516,6 +519,7 @@ init_snap_hdr(void) static void load_snap_hdr(void) { + xlseek(ifd, 0, SEEK_SET); read_snap_hdr(ifd, &snap_hdr); match_ver(snap_hdr.flags); }