dedup

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

commit d04f1686624a9c680965f0c090cc1808935687f4
parent ca0493fa7861e7fd5bcdc108d7f56c4109d09fae
Author: sin <sin@2f30.org>
Date:   Wed,  8 May 2019 01:16:43 +0100

Re-arrange some defines

Diffstat:
Mbstorage.c | 12++++++++----
Msnap.c | 3+++
2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/bstorage.c b/bstorage.c @@ -33,20 +33,24 @@ /* block header constants */ #define BHDRMAGIC "DEDUPDIDUPDIDUP" #define NBHDRMAGIC sizeof(BHDRMAGIC) + #define VMIN 0 #define VMAJ 1 #define VMINMASK 0xff #define VMAJSHIFT 8 #define VMAJMASK 0xff -#define EALGOSHIFT 19 -#define EALGOMASK 0x7 -#define ENONETYPE 0 -#define ECHACHATYPE 1 + #define CALGOSHIFT 16 #define CALGOMASK 0x7 #define CNONETYPE 0 #define CSNAPPYTYPE 1 #define CLZ4TYPE 2 + +#define EALGOSHIFT 19 +#define EALGOMASK 0x7 +#define ENONETYPE 0 +#define ECHACHATYPE 1 + #define BHDRSIZE (NBHDRMAGIC + 8 + 8) /* block descriptor constants */ diff --git a/snap.c b/snap.c @@ -20,13 +20,16 @@ #include "queue.h" #include "snap.h" +/* snapshot header constants */ #define SHDRMAGIC "SNAPSNAPPYSNOOP" #define NSHDRMAGIC sizeof(SHDRMAGIC) + #define VMIN 0 #define VMAJ 1 #define VMINMASK 0xff #define VMAJSHIFT 8 #define VMAJMASK 0xff + #define SHDRSIZE (NSHDRMAGIC + 24 + 24 + 8 + 8) #define NERRBUF 128