From c5f0334e87deea2b54f33f62ee879455a814633c Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 20 Apr 2023 14:08:34 +0200 Subject: libfstree: Remove special modes for hard links Instead of adding special sentinel modes, simply treat hard links as special case of symlinks, setting a flag to indicate that it is a hard link and another flag to indicate that it has been resolved. Signed-off-by: David Oberhollenzer --- include/fstree.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include/fstree.h') diff --git a/include/fstree.h b/include/fstree.h index 72cbc29..d08ccae 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -18,9 +18,6 @@ #include "io/istream.h" #include "compat.h" -#define FSTREE_MODE_HARD_LINK (0) -#define FSTREE_MODE_HARD_LINK_RESOLVED (1) - typedef struct fstree_defaults_t fstree_defaults_t; typedef struct tree_node_t tree_node_t; typedef struct fstree_t fstree_t; @@ -28,6 +25,8 @@ typedef struct fstree_t fstree_t; enum { FLAG_DIR_CREATED_IMPLICITLY = 0x01, FLAG_FILE_ALREADY_MATCHED = 0x02, + FLAG_LINK_IS_HARD = 0x04, + FLAG_LINK_RESOVED = 0x08, }; /* A node in a file system tree */ -- cgit v1.2.3