X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fdentry.h;h=1629111d83d1ccc5d662436aef09e7f0a2d00e98;hp=5d12b4b857ccccf5949f1aedf30801362f57276f;hb=fd23809cca6a7e9fa748f1c8ec4cc35245337221;hpb=e94aa48490fda7524b49478e5aa2dc4b7d03b0a1 diff --git a/src/dentry.h b/src/dentry.h index 5d12b4b8..1629111d 100644 --- a/src/dentry.h +++ b/src/dentry.h @@ -78,12 +78,16 @@ struct wim_ads_entry { * terminating null character. */ u16 stream_name_nbytes; - /* Stream name (UTF-16LE) */ - utf16lechar *stream_name; - /* Number to identify an alternate data stream even after it's possibly * been moved or renamed. */ u32 stream_id; + + /* Stream name (UTF-16LE) */ + utf16lechar *stream_name; + + /* Unused field. We read it into memory so we can write it out + * unchanged. */ + u64 unused; }; @@ -231,9 +235,21 @@ struct wim_inode { /* Used only in NTFS-mode extraction */ u8 i_dos_name_extracted : 1; + /* Set to 0 if reparse point fixups have been done. Otherwise set to 1. + * + * Note: this actually may reflect the SYMBOLIC_LINK_RELATIVE flag. */ + u16 i_not_rpfixed; + /* Number of alternate data streams associated with this inode */ u16 i_num_ads; + /* Unused/unknown fields that we just read into memory so we can + * re-write them unchanged. */ + u64 i_unused_1; + u64 i_unused_2; + u32 i_rp_unknown_1; + u16 i_rp_unknown_2; + /* A hash of the file's contents, or a pointer to the lookup table entry * for this dentry if the lookup table entries have been resolved. * @@ -406,7 +422,7 @@ free_dentry_tree(struct wim_dentry *root, extern void unlink_dentry(struct wim_dentry *dentry); -extern bool +extern struct wim_dentry * dentry_add_child(struct wim_dentry * restrict parent, struct wim_dentry * restrict child); @@ -427,6 +443,10 @@ inode_add_ads_with_data(struct wim_inode *inode, const tchar *name, const void *value, size_t size, struct wim_lookup_table *lookup_table); +extern int +inode_set_unnamed_stream(struct wim_inode *inode, const void *data, size_t len, + struct wim_lookup_table *lookup_table); + extern void inode_remove_ads(struct wim_inode *inode, u16 idx, struct wim_lookup_table *lookup_table); @@ -503,8 +523,8 @@ static inline bool inode_is_symlink(const struct wim_inode *inode) { return (inode->i_attributes & FILE_ATTRIBUTE_REPARSE_POINT) - && ((inode->i_reparse_tag == WIM_IO_REPARSE_TAG_SYMLINK) || - inode->i_reparse_tag == WIM_IO_REPARSE_TAG_MOUNT_POINT); + && (inode->i_reparse_tag == WIM_IO_REPARSE_TAG_SYMLINK || + inode->i_reparse_tag == WIM_IO_REPARSE_TAG_MOUNT_POINT); } static inline bool