- /* List of dentries in the inode (hard link set) */
- struct list_head d_alias;
-
- /* The parent of this directory entry. */
- struct wim_dentry *parent;
-
- /*
- * Size of directory entry on disk, in bytes. Typical size is around
- * 104 to 120 bytes.
- *
- * It is possible for the length field to be 0. This situation, which
- * is undocumented, indicates the end of a list of sibling nodes in a
- * directory. It also means the real length is 8, because the dentry
- * included only the length field, but that takes up 8 bytes.
- *
- * The length here includes the base directory entry on disk as well as
- * the long and short filenames. It does NOT include any alternate
- * stream entries that may follow the directory entry, even though the
- * size of those needs to be considered. The length SHOULD be 8-byte
- * aligned, although we don't require it to be. We do require the
- * length to be large enough to hold the file name(s) of the dentry;
- * additionally, a warning is issued if this field is larger than the
- * aligned size.
- */
- u64 length;
-
- /* The offset, from the start of the uncompressed WIM metadata resource
- * for this image, of this dentry's child dentries. 0 if the directory
- * entry has no children, which is the case for regular files or reparse
- * points. */
- u64 subdir_offset;
-
- u64 d_unused_1;
- u64 d_unused_2;
-
- /* Pointer to the UTF-16LE short filename (malloc()ed buffer) */
- utf16lechar *short_name;
-
- /* Pointer to the UTF-16LE filename (malloc()ed buffer). */
- utf16lechar *file_name;
-
- /* 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)
-
-/*
- * WIM inode.
- *
- * As mentioned above, in the WIM file that is no on-disk analogue of a real
- * inode, as most of these fields are duplicated in the dentries.
- */
-struct wim_inode {
- /* Timestamps for the inode. The timestamps are the number of
- * 100-nanosecond intervals that have elapsed since 12:00 A.M., January
- * 1st, 1601, UTC. This is the same format used in NTFS inodes. */
- u64 i_creation_time;
- u64 i_last_access_time;
- u64 i_last_write_time;
-
- /* The file attributes associated with this inode. This is a bitwise OR
- * of the FILE_ATTRIBUTE_* flags. */
- u32 i_attributes;
-
- /* The index of the security descriptor in the WIM image's table of
- * security descriptors that contains this file's security information.
- * If -1, no security information exists for this file. */
- int32_t i_security_id;
-
- /* %true iff the inode's lookup table entries has been resolved (i.e.
- * the @lte field is valid, but the @hash field is not valid)
- *
- * (This is not an on-disk field.) */
- u8 i_resolved : 1;
-
- u8 i_visited : 1;
-
- /* 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. */
- u32 i_rp_unknown_1;
- u16 i_rp_unknown_2;
-
- /* If i_resolved == 0:
- * SHA1 message digest of the contents of the unnamed-data stream
- * of this inode, or all zeroes if this inode has no unnamed data
- * stream, or optionally all zeroes if this inode has an empty
- * unnamed data stream.
- *
- * If i_resolved == 1:
- * Pointer to the lookup table entry for the unnamed data stream
- * of this inode, or NULL if this inode has no unnamed data stream,
- * or optionally all zeroes if this inode has an empty unnamed data
- * stream.
- */