summaryrefslogtreecommitdiff
path: root/src/path.h
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2024-02-16 14:54:24 +0900
committerRyo Nakamura <upa@haeena.net>2024-02-17 12:39:19 +0900
commitf71c7a145a4c840baff1d34e9d2c3d9e2f26d74e (patch)
tree0931150b21c7e9e883437dccc212c4206c43db5f /src/path.h
parent4e895bb72e035c7c5034dd8beca7c8497413ad9e (diff)
add checkpoint.c and .h
Diffstat (limited to 'src/path.h')
-rw-r--r--src/path.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/path.h b/src/path.h
index 6cc2a52..aa61c44 100644
--- a/src/path.h
+++ b/src/path.h
@@ -20,8 +20,12 @@ struct path {
#define FILE_STATE_INIT 0
#define FILE_STATE_OPENED 1
#define FILE_STATE_DONE 2
+
+ uint64_t data; /* used by other components, i.e., checkpoint */
};
+struct path *alloc_path(char *path, char *dst_path);
+
struct chunk {
struct path *p;
size_t off; /* offset of this chunk on the file on path p */
@@ -32,6 +36,8 @@ struct chunk {
#define CHUNK_STATE_DONE 2
};
+struct chunk *alloc_chunk(struct path *p, size_t off, size_t len);
+
struct path_resolve_args {
size_t *total_bytes;