]> wimlib.net Git - wimlib/blobdiff - src/dentry.h
hardlink fixes
[wimlib] / src / dentry.h
index c1d167765b86dc527d1c9a003f5d9fb9abf1a26d..fd65b02dbab008d207434abbe023c6ce1cb7c31b 100644 (file)
@@ -3,8 +3,10 @@
 
 #include "util.h"
 #include "config.h"
+#include "list.h"
 #include <string.h>
 
+
 struct stat;
 struct lookup_table;
 typedef struct WIMStruct WIMStruct;
@@ -186,10 +188,8 @@ struct dentry {
         * WIMStructs */
        int refcnt;
 
-       /* Next dentry in the hard link set */
-       //struct dentry *next_dentry_in_link_set;
-       /* Next hard link that has a lookup table entry */
-       //struct dentry *next_link_set;
+       /* List of dentries in the hard link set */
+       struct list_head link_group_list;
 };
 
 /* Return hash of the "unnamed" (default) data stream. */
@@ -205,6 +205,14 @@ static inline const u8 *dentry_hash(const struct dentry *dentry)
        return dentry->hash;
 }
 
+static inline size_t dentry_link_group_size(struct dentry *dentry)
+{
+       size_t size = 0;
+       struct list_head *list;
+       list_for_each(list, &dentry->link_group_list)
+               size++;
+       return size;
+}
 
 extern struct ads_entry *dentry_get_ads_entry(struct dentry *dentry,
                                              const char *stream_name);