X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fdentry.h;h=0021eeae2855c2167517562e7788e6316eb0fc9e;hp=e8d8328d9d27b352021a7bf3ff3c9a06ba90bfc8;hb=cf373e59a7f6ff7d1fd007c1f22defe508aa67d4;hpb=650997e4865a090b6856c7ca34b02f42994e8e29 diff --git a/src/dentry.h b/src/dentry.h index e8d8328d..0021eeae 100644 --- a/src/dentry.h +++ b/src/dentry.h @@ -81,11 +81,9 @@ struct wim_ads_entry { /* Stream name (UTF-16LE) */ utf16lechar *stream_name; -#ifdef WITH_FUSE /* Number to identify an alternate data stream even after it's possibly * been moved or renamed. */ u32 stream_id; -#endif }; @@ -186,10 +184,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; @@ -197,7 +191,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) @@ -269,9 +263,19 @@ struct wim_inode { * link_count of them) */ struct list_head i_dentry; - struct hlist_node i_hlist; + union { + struct hlist_node i_hlist; + struct list_head i_list; + }; + + union { + /* Used during image extraction to build a list of inodes that + * share a certain stream */ + struct list_head i_lte_inode_list; - struct list_head i_lte_inode_list; + /* Device number, used only during image capture */ + u64 i_devno; + }; tchar *i_extracted_file; @@ -280,15 +284,14 @@ struct wim_inode { * noted in the @attributes field.) */ struct rb_root i_children; + /* Next alternate data stream ID to be assigned */ + u32 i_next_stream_id; + #ifdef WITH_FUSE /* wimfs file descriptors table for the inode */ u16 i_num_opened_fds; u16 i_num_allocated_fds; struct wimfs_fd **i_fds; - - /* Next alternate data stream ID to be assigned */ - u32 i_next_stream_id; - /* This mutex protects the inode's file descriptors table during * read-only mounts. Read-write mounts are still restricted to 1 * thread. */ @@ -339,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); @@ -372,6 +372,15 @@ print_dentry(struct wim_dentry *dentry, void *lookup_table); extern int print_dentry_full_path(struct wim_dentry *entry, void *ignore); +extern int +calculate_dentry_full_path(struct wim_dentry *dentry); + +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); @@ -394,9 +403,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);