]> wimlib.net Git - wimlib/blobdiff - src/lookup_table.h
verify_dentry()
[wimlib] / src / lookup_table.h
index c15bf4046e35ded1ceb167089b824be965220664..8634c7f9686e0206760a7de185c02b3f49b69398 100644 (file)
@@ -26,13 +26,17 @@ struct lookup_table {
 
 struct wimlib_fd;
 
+#ifdef WITH_NTFS_3G
 typedef struct _ntfs_attr ntfs_attr;
 typedef struct _ntfs_volume ntfs_volume;
 struct ntfs_location {
-       ntfs_volume *vol;
-       const char *path;
-       const char *ads_name;
+       char *path_utf8;
+       char *stream_name_utf16;
+       u16 stream_name_utf16_num_chars;
+       ntfs_volume **ntfs_vol_p;
+       bool is_reparse_point;
 };
+#endif
 
 /* 
  * An entry in the lookup table in the WIM file. 
@@ -93,12 +97,16 @@ struct lookup_table_entry {
                char *file_on_disk;
                char *staging_file_name;
                u8 *attached_buffer;
-               struct ntfs_location *ntfs_location;
+       #ifdef WITH_NTFS_3G
+               struct ntfs_location *ntfs_loc;
+       #endif
        };
        union {
                struct lookup_table_entry *next_lte_in_swm;
                FILE *file_on_disk_fp;
+       #ifdef WITH_NTFS_3G
                ntfs_attr *attr;
+       #endif
        };
 #ifdef WITH_FUSE
        /* File descriptors table for this data stream */
@@ -286,6 +294,16 @@ static inline const u8 *dentry_stream_hash_unresolved(const struct dentry *dentr
                return dentry->ads_entries[stream_idx - 1].hash;
 }
 
+static inline unsigned dentry_stream_name_len(const struct dentry *dentry,
+                                             unsigned stream_idx)
+{
+       wimlib_assert(stream_idx <= dentry->num_ads);
+       if (stream_idx == 0)
+               return dentry->file_name_len;
+       else
+               return dentry->ads_entries[stream_idx - 1].stream_name_len;
+}
+
 static inline const u8 *dentry_stream_hash_resolved(const struct dentry *dentry,
                                                    unsigned stream_idx)
 {