Re-arrange some defines - dedup - deduplicating backup program HTML git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit d04f1686624a9c680965f0c090cc1808935687f4 DIR parent ca0493fa7861e7fd5bcdc108d7f56c4109d09fae HTML Author: sin <sin@2f30.org> Date: Wed, 8 May 2019 01:16:43 +0100 Re-arrange some defines Diffstat: M bstorage.c | 12 ++++++++---- M snap.c | 3 +++ 2 files changed, 11 insertions(+), 4 deletions(-) --- DIR 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 */ DIR 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