dedup

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

commit 7728f1e69f44f5ad45e61946f3747234c7d47094
parent fbfe225ce55f4ffabc9368f373171aac1e198935
Author: sin <sin@2f30.org>
Date:   Tue, 20 Mar 2018 17:57:00 +0000

Change index/store filename

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

diff --git a/dedup.c b/dedup.c @@ -9,6 +9,8 @@ #include <openssl/sha.h> #include "arg.h" +#define INDEXF ".index" +#define STOREF ".store" #define BLKSIZ 32768 struct enthdr { @@ -248,13 +250,13 @@ init(void) { struct stat sb; - ifd = open("index", O_RDWR | O_CREAT, 0600); + ifd = open(INDEXF, O_RDWR | O_CREAT, 0600); if (ifd == -1) - err(1, "open index"); + err(1, "open %s", INDEXF); - sfd = open("store", O_RDWR | O_CREAT, 0600); + sfd = open(STOREF, O_RDWR | O_CREAT, 0600); if (sfd == -1) - err(1, "open store"); + err(1, "open %s", STOREF); if (fstat(ifd, &sb) == -1) err(1, "stat index");