X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Fdentry.h;h=914069317f90dec699b81bee29bd193c58f23e5d;hp=6597e7776e77518205759d8d457ade603902abee;hb=9c088d75ecfd3c2c65a6e7e1b54eb65c7f1cab14;hpb=c2be2a2774b80732021e47268769e384d5e263e7 diff --git a/include/wimlib/dentry.h b/include/wimlib/dentry.h index 6597e777..91406931 100644 --- a/include/wimlib/dentry.h +++ b/include/wimlib/dentry.h @@ -76,17 +76,6 @@ struct wim_dentry { * including the terminating null character. */ u32 full_path_nbytes; - /* For extraction operations, this flag will be set on dentries in the - * tree being extracted. Otherwise this will always be 0. */ - u8 in_extraction_tree : 1; - - /* For extraction operations, this flag will be set when a dentry in the - * tree being extracted is not being extracted for some reason (file - * type not supported by target filesystem, contains invalid characters, - * or not in one of the multiple sub-trees being extracted). Otherwise - * this will always be 0. */ - u8 extraction_skipped : 1; - /* During extraction extractions, this flag will be set after the * "skeleton" of the dentry has been extracted. */ u8 skeleton_extracted : 1; @@ -97,21 +86,19 @@ struct wim_dentry { * always be 0. */ u8 is_win32_name : 1; - /* When verifying the dentry tree after reading it into memory, this - * flag will be set on all dentries in a hard link group that have a - * nonempty DOS name except one. This is because it is supposed to be - * illegal (on NTFS, at least) for a single inode to have multiple DOS - * names. */ - u8 dos_name_invalid : 1; - + /* Temporary flag; always reset to 0 when done using. */ u8 tmp_flag : 1; - u8 was_hardlinked : 1; + /* Set to 1 if this name was extracted as a link, so no streams need to + * be extracted to it. */ + u8 was_linked : 1; - /* Temporary list field used to make lists of dentries in a few places. - * */ + /* Temporary list field */ struct list_head tmp_list; + /* Links list of dentries being extracted */ + struct list_head extraction_list; + /* Linked list node that places this dentry in the list of aliases for * its inode (d_inode) */ struct list_head d_alias; @@ -125,12 +112,6 @@ struct wim_dentry { u64 length; u64 subdir_offset; - /* These correspond to the two unused fields in the on-disk WIM dentry; - * we read them into memory so we can write them unchanged. These - * fields are set to 0 on new dentries. */ - u64 d_unused_1; - u64 d_unused_2; - /* Pointer to the UTF-16LE short filename (malloc()ed buffer), or NULL * if this dentry has no short name. */ utf16lechar *short_name; @@ -226,12 +207,6 @@ wim_pathname_to_stream(WIMStruct *wim, u16 *stream_idx_ret); #endif -extern int -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); @@ -279,14 +254,8 @@ rename_wim_path(WIMStruct *wim, const tchar *from, const tchar *to, extern int -read_dentry(const u8 * restrict metadata_resource, - u64 metadata_resource_len, u64 offset, - struct wim_dentry * restrict dentry); - -extern int -read_dentry_tree(const u8 * restrict metadata_resource, - u64 metadata_resource_len, - struct wim_dentry * restrict dentry); +read_dentry_tree(const u8 *buf, size_t buf_len, + u64 root_offset, struct wim_dentry **root_ret); extern u8 * write_dentry_tree(const struct wim_dentry * restrict tree,