tChange index/store filename - dedup - deduplicating backup program
(HTM) git clone git://git.z3bra.org/dedup.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 7728f1e69f44f5ad45e61946f3747234c7d47094
(DIR) parent fbfe225ce55f4ffabc9368f373171aac1e198935
(HTM) Author: sin <sin@2f30.org>
Date: Tue, 20 Mar 2018 17:57:00 +0000
Change index/store filename
Diffstat:
M dedup.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/dedup.c b/dedup.c
t@@ -9,6 +9,8 @@
#include <openssl/sha.h>
#include "arg.h"
+#define INDEXF ".index"
+#define STOREF ".store"
#define BLKSIZ 32768
struct enthdr {
t@@ -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");