tRename field - 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 2a1b814e1085c97b0a76d1b8cf1379032bb16adb
(DIR) parent 1e0ae643c3d751e822d518af206d1701d77b9b1a
(HTM) Author: sin <sin@2f30.org>
Date: Fri, 26 Apr 2019 17:59:39 +0100
Rename field
Diffstat:
M bstorage.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
(DIR) diff --git a/bstorage.c b/bstorage.c
t@@ -78,7 +78,7 @@ static struct bops bops = {
struct bhdr {
char magic[NBHDRMAGIC];
uint64_t flags;
- uint64_t nent;
+ uint64_t nbd;
};
/* Block descriptor */
t@@ -182,7 +182,7 @@ unpackbhdr(int fd, struct bhdr *bhdr)
n = unpack(buf, "'16qq",
bhdr->magic,
&bhdr->flags,
- &bhdr->nent);
+ &bhdr->nbd);
assert(n == sizeof(buf));
return n;
t@@ -198,7 +198,7 @@ packbhdr(int fd, struct bhdr *bhdr)
n = pack(buf, "'16qq",
bhdr->magic,
bhdr->flags,
- bhdr->nent);
+ bhdr->nbd);
assert(n == BHDRSIZE);
if (xwrite(fd, buf, n) != n)
t@@ -292,7 +292,7 @@ initbdcache(struct sctx *sctx)
uint64_t i;
bhdr = &sctx->bhdr;
- for (i = 0; i < bhdr->nent; i++) {
+ for (i = 0; i < bhdr->nbd; i++) {
struct bd *bd, *tmp;
if (loadbd(sctx) == 0)
t@@ -360,7 +360,7 @@ bscreat(struct bctx *bctx, char *path, int mode, struct bparam *bpar)
return -1;
}
- bhdr->nent = 0;
+ bhdr->nbd = 0;
sctx->fd = fd;
if (packbhdr(fd, bhdr) < 0) {
t@@ -519,7 +519,7 @@ bsput(struct bctx *bctx, void *buf, size_t n, unsigned char *md)
}
bhdr = &sctx->bhdr;
- bhdr->nent++;
+ bhdr->nbd++;
RB_INSERT(bdcache, &sctx->bdcache, bd);
memcpy(md, bd->md, MDSIZE);
return bd->size;