From e5694858eac4c199022b822f41bc40d769f5aed9 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 17 Jun 2019 11:35:04 +0200 Subject: libfstree: add generic function to add node from struct stat Signed-off-by: David Oberhollenzer --- include/fstree.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/fstree.h b/include/fstree.h index 23cf967..66a850e 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -199,6 +199,14 @@ tree_node_t *fstree_add_file(fstree_t *fs, const char *path, uint16_t mode, uint32_t uid, uint32_t gid, uint64_t filesz, const char *input); +/* + internally calls fstree_add or fstree_add_file depending on the given stat + structure and sets the link target for symlinks or input file for regular + files from the given extra string. +*/ +tree_node_t *fstree_add_generic(fstree_t *fs, const char *path, + const struct stat *sb, const char *extra); + /* Add an extended attribute key value pair to a tree node. -- cgit v1.2.3