dedup

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

commit 7da9e6101622a5682c04733dcf7f3ff849bcb9bf
parent 6b21cc335d619eb1bdf2ea285087e98e4c78d7e4
Author: sin <sin@2f30.org>
Date:   Sun, 12 May 2019 10:17:25 +0100

Rename {load,save}state to {read,write}state

Diffstat:
Mdup-check.c | 4++--
Mdup-gc.c | 4++--
Mdup-init.c | 4++--
Mdup-pack.c | 4++--
Mdup-rm.c | 4++--
Mdup-unpack.c | 4++--
Mstate.c | 4++--
Mstate.h | 4++--
8 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/dup-check.c b/dup-check.c @@ -33,8 +33,8 @@ initparam(char *repo) fd = open(path, O_RDONLY); if (fd < 0) err(1, "open: %s", path); - if (loadstate(fd, &param) < 0) - errx(1, "loadstate: failed"); + if (readstate(fd, &param) < 0) + errx(1, "readstate: failed"); if (close(fd) < 0) err(1, "close: %s", path); } diff --git a/dup-gc.c b/dup-gc.c @@ -31,8 +31,8 @@ initparam(char *repo) fd = open(path, O_RDONLY); if (fd < 0) err(1, "open: %s", path); - if (loadstate(fd, &param) < 0) - errx(1, "loadstate: failed"); + if (readstate(fd, &param) < 0) + errx(1, "readstate: failed"); if (close(fd) < 0) err(1, "close: %s", path); } diff --git a/dup-init.c b/dup-init.c @@ -32,8 +32,8 @@ initparam(char *repo) fd = open(path, O_RDWR | O_CREAT | O_EXCL, 0600); if (fd < 0) err(1, "open: %s", path); - if (savestate(fd, &param) < 0) - errx(1, "loadstate: failed"); + if (writestate(fd, &param) < 0) + errx(1, "readstate: failed"); if (close(fd) < 0) err(1, "close: %s", path); } diff --git a/dup-pack.c b/dup-pack.c @@ -32,8 +32,8 @@ initparam(char *repo) fd = open(path, O_RDONLY); if (fd < 0) err(1, "open: %s", path); - if (loadstate(fd, &param) < 0) - errx(1, "loadstate: failed"); + if (readstate(fd, &param) < 0) + errx(1, "readstate: failed"); if (close(fd) < 0) err(1, "close: %s", path); } diff --git a/dup-rm.c b/dup-rm.c @@ -31,8 +31,8 @@ initparam(char *repo) fd = open(path, O_RDONLY); if (fd < 0) err(1, "open: %s", path); - if (loadstate(fd, &param) < 0) - errx(1, "loadstate: failed"); + if (readstate(fd, &param) < 0) + errx(1, "readstate: failed"); if (close(fd) < 0) err(1, "close: %s", path); } diff --git a/dup-unpack.c b/dup-unpack.c @@ -32,8 +32,8 @@ initparam(char *repo) fd = open(path, O_RDONLY); if (fd < 0) err(1, "open: %s", path); - if (loadstate(fd, &param) < 0) - errx(1, "loadstate: failed"); + if (readstate(fd, &param) < 0) + errx(1, "readstate: failed"); if (close(fd) < 0) err(1, "close: %s", path); } diff --git a/state.c b/state.c @@ -65,7 +65,7 @@ packshdr(int fd, struct shdr *shdr) } int -savestate(int fd, struct param *par) +writestate(int fd, struct param *par) { struct shdr shdr; @@ -96,7 +96,7 @@ savestate(int fd, struct param *par) } int -loadstate(int fd, struct param *par) +readstate(int fd, struct param *par) { struct shdr shdr; int algo; diff --git a/state.h b/state.h @@ -5,5 +5,5 @@ struct param { int keyloaded; }; -int savestate(int, struct param *); -int loadstate(int fd, struct param *); +int writestate(int, struct param *); +int readstate(int fd, struct param *);