summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-21 15:24:38 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-21 15:44:02 +0200
commit73db760b3fd2d3f2ff9186deb86589fdc36f2542 (patch)
treef0f75f2f9953a9028e4f8b77c65cb8a657c794d9 /include
parent53bb1720f0603b185d71cc3db1194d9bf16fdbe2 (diff)
Cleanup xattr handling
- Store them in a struct instead of a hacky uint64_t with magic shifts - Split up key/value pair write function to write_key and write_value - Move the size accounting into those functions respectively Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/fstree.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/fstree.h b/include/fstree.h
index ea7cf88..4efa9d5 100644
--- a/include/fstree.h
+++ b/include/fstree.h
@@ -46,9 +46,11 @@ struct tree_xattr_t {
/* linked list pointer of list of attributes in @ref fstree_t */
tree_xattr_t *next;
- /* Array with pairs of key-value tupples.
- Each key-value tupple is encoded as (key << 32) | value. */
- uint64_t ref[];
+ /* Array with pairs of key-value tupples */
+ struct {
+ uint32_t key_index;
+ uint32_t value_index;
+ } attr[];
};
/* Additional meta data stored in a tree_node_t for regular files. */