aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-27 17:28:43 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-28 16:33:57 +0200
commitf7fa69e896f0971629f938be93cb30865f92943c (patch)
treedb6dd754b95cec7db7a274c882c5eb07e5982e3d /include
parent256c2458a4fa298c876d8e4a4450cb9a0834b877 (diff)
Add general purpose flags field to file_info_t
Simplifies some task if we can just add a flag that a file has a framgent or that it has already been detected as a duplicate. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/fstree.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/fstree.h b/include/fstree.h
index 23634fc..687b693 100644
--- a/include/fstree.h
+++ b/include/fstree.h
@@ -22,6 +22,14 @@ typedef struct dir_info_t dir_info_t;
typedef struct fstree_t fstree_t;
typedef struct tree_xattr_t tree_xattr_t;
+enum {
+ FILE_FLAG_HAS_FRAGMENT = 0x01,
+
+ FILE_FLAG_FRAGMENT_IS_DUPLICATE = 0x02,
+
+ FILE_FLAG_BLOCKS_ARE_DUPLICATE = 0x04,
+};
+
/* Encapsulates a set of key-value pairs attached to a tree_node_t */
struct tree_xattr_t {
/* Number of key-value pairs */
@@ -80,6 +88,9 @@ struct file_info_t {
uint32_t fragment_chksum;
+ /* combination of FILE_FLAG_* flags */
+ uint32_t flags;
+
/* Stores data about each full data block. */
struct {
uint32_t chksum;