]> wimlib.net Git - wimlib/blobdiff - src/dentry.h
refcnt image metadata; calculate full path on-demand
[wimlib] / src / dentry.h
index 6a3affcdb56a66d0ae82b0466b6a1a28a239c21c..28fdeaf27207570ac52cabaa0addaa219458e222 100644 (file)
@@ -142,9 +142,10 @@ struct wim_dentry {
        u16 file_name_nbytes;
 
        /* Length of full path name encoded using "tchars", in bytes, not
-        * including the terminating null terminator. */
+        * including the terminating null character. */
        u32 full_path_nbytes;
 
+       /* Has this dentry been extracted yet? */
        u8 is_extracted : 1;
 
        /* Only used during NTFS capture */
@@ -185,10 +186,6 @@ struct wim_dentry {
         * points. */
        u64 subdir_offset;
 
-       /* Number of references to the dentry tree itself, as in multiple
-        * WIMStructs */
-       u32 refcnt;
-
        /* Pointer to the UTF-16LE short filename (malloc()ed buffer) */
        utf16lechar *short_name;
 
@@ -196,7 +193,7 @@ struct wim_dentry {
        utf16lechar *file_name;
 
        /* Full path of this dentry */
-       tchar *full_path;
+       tchar *_full_path;
 };
 
 #define rbnode_dentry(node) container_of(node, struct wim_dentry, rb_node)
@@ -270,7 +267,14 @@ struct wim_inode {
 
        struct hlist_node i_hlist;
 
-       struct list_head i_lte_inode_list;
+       union {
+               /* Used during image extraction to build a list of inodes that
+                * share a certain stream */
+               struct list_head i_lte_inode_list;
+
+               /* Device number, used only during image capture */
+               u64 i_devno;
+       };
 
        tchar *i_extracted_file;
 
@@ -338,9 +342,6 @@ for_dentry_in_tree_depth(struct wim_dentry *root,
                         int (*visitor)(struct wim_dentry*, void*),
                         void *args);
 
-extern int
-calculate_dentry_full_path(struct wim_dentry *dentry, void *ignore);
-
 extern void
 calculate_subdir_offsets(struct wim_dentry *dentry, u64 *subdir_offset_p);
 
@@ -371,6 +372,12 @@ print_dentry(struct wim_dentry *dentry, void *lookup_table);
 extern int
 print_dentry_full_path(struct wim_dentry *entry, void *ignore);
 
+extern tchar *
+dentry_full_path(struct wim_dentry *dentry);
+
+extern struct wim_inode *
+new_timeless_inode();
+
 extern int
 new_dentry(const tchar *name, struct wim_dentry **dentry_ret);
 
@@ -393,9 +400,6 @@ extern void
 free_dentry_tree(struct wim_dentry *root,
                 struct wim_lookup_table *lookup_table);
 
-extern int
-increment_dentry_refcnt(struct wim_dentry *dentry, void *ignore);
-
 extern void
 unlink_dentry(struct wim_dentry *dentry);