X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Fdentry.h;h=dfb5a95be76b5301f6ea31c41b235b44bc9be28b;hp=1e08ae3f86f26b546d1f5e2725ace362f44bc517;hb=fced769402ff6ef0bf75fe9e4dcb2880891469e0;hpb=e78ce6d7c0a0d93194c8fcf9398fc086b912f842 diff --git a/include/wimlib/dentry.h b/include/wimlib/dentry.h index 1e08ae3f..dfb5a95b 100644 --- a/include/wimlib/dentry.h +++ b/include/wimlib/dentry.h @@ -18,6 +18,7 @@ struct wim_lookup_table; struct wim_lookup_table_entry; struct wimfs_fd; struct wim_inode; +struct wim_security_data; /* Size of the struct wim_dentry up to and including the file_name_len. */ #define WIM_DENTRY_DISK_SIZE 102 @@ -128,9 +129,20 @@ struct wim_dentry { /* The inode for this dentry */ struct wim_inode *d_inode; - /* Red-black tree of sibling dentries */ + /* Node for the parent's red-black tree of child dentries, sorted by + * case sensitive long name. */ struct rb_node rb_node; +#ifdef __WIN32__ + /* Node for the parent's red-black tree of child dentries, sorted by + * case insensitive long name. */ + struct rb_node rb_node_case_insensitive; + + /* List of dentries in a directory that have different case sensitive + * long names but share the same case insensitive long name */ + struct list_head case_insensitive_conflict_list; +#endif + /* Length of UTF-16LE encoded short filename, in bytes, not including * the terminating zero wide-character. */ u16 short_name_nbytes; @@ -146,9 +158,14 @@ struct wim_dentry { /* Does this dentry need to be extracted? */ u8 needs_extraction : 1; + u8 not_extracted : 1; + /* Only used during NTFS capture */ u8 is_win32_name : 1; + /* Set to 1 if an inode has multiple DOS names. */ + u8 dos_name_invalid : 1; + /* Temporary list */ struct list_head tmp_list; @@ -193,8 +210,16 @@ struct wim_dentry { /* Pointer to the UTF-16LE filename (malloc()ed buffer). */ utf16lechar *file_name; - /* Full path of this dentry */ + /* Full path of this dentry in the WIM */ tchar *_full_path; + + /* Actual name to extract this dentry as. */ + tchar *extraction_name; + size_t extraction_name_nchars; + + /* List head for building a list of dentries that contain a certain + * stream. */ + struct list_head extraction_stream_list; }; #define rbnode_dentry(node) container_of(node, struct wim_dentry, rb_node) @@ -228,9 +253,6 @@ struct wim_inode { * (This is not an on-disk field.) */ u8 i_resolved : 1; - /* %true iff verify_inode() has run on this inode. */ - u8 i_verified : 1; - u8 i_visited : 1; /* Used only in NTFS-mode extraction */ @@ -283,8 +305,8 @@ struct wim_inode { /* Device number, used only during image capture */ u64 i_devno; - /* List of dentries that reference this inode (there should be - * link_count of them) */ + /* List of dentries that reference this inode (there should be i_nlink + * of them) */ struct list_head i_dentry; union { @@ -299,6 +321,10 @@ struct wim_inode { * noted in the @attributes field.) */ struct rb_root i_children; +#ifdef __WIN32__ + struct rb_root i_children_case_insensitive; +#endif + /* Next alternate data stream ID to be assigned */ u32 i_next_stream_id; @@ -323,6 +349,9 @@ struct wim_inode { #define inode_first_dentry(inode) \ container_of(inode->i_dentry.next, struct wim_dentry, d_alias) +#define inode_first_full_path(inode) \ + dentry_full_path(inode_first_dentry(inode)) + static inline bool dentry_is_first_in_inode(const struct wim_dentry *dentry) { @@ -387,6 +416,9 @@ 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 int calculate_dentry_tree_full_paths(struct wim_dentry *root); @@ -570,7 +602,7 @@ inode_ref_streams(struct wim_inode *inode); extern int dentry_tree_fix_inodes(struct wim_dentry *root, struct list_head *inode_list); -extern int -verify_dentry(struct wim_dentry *dentry, void *wim); +int +verify_inode(struct wim_inode *inode, const struct wim_security_data *sd); #endif