]> wimlib.net Git - wimlib/blobdiff - include/wimlib/lookup_table.h
Read concat runs
[wimlib] / include / wimlib / lookup_table.h
index b5b3830fcbde38ac13ee876aaec39ccf23aaf753..a6bed894850a674e864b10b65c2127c5f85f19ea 100644 (file)
@@ -185,7 +185,10 @@ struct wim_lookup_table_entry {
        /* Pointers to somewhere where the stream is actually located.  See the
         * comments for the @resource_location field above. */
        union {
-               struct wim_resource_spec *rspec;
+               struct {
+                       struct wim_resource_spec *rspec;
+                       u64 offset_in_res;
+               };
                tchar *file_on_disk;
                void *attached_buffer;
        #ifdef WITH_FUSE
@@ -283,6 +286,13 @@ lte_cchunk_size(const struct wim_lookup_table_entry * lte)
                return 32768;
 }
 
+static inline bool
+lte_is_partial(const struct wim_lookup_table_entry * lte)
+{
+       return lte->resource_location == RESOURCE_IN_WIM &&
+              lte->size != lte->rspec->uncompressed_size;
+}
+
 static inline bool
 lte_filename_valid(const struct wim_lookup_table_entry *lte)
 {
@@ -388,9 +398,7 @@ lte_bind_wim_resource_spec(struct wim_lookup_table_entry *lte,
 {
        lte->resource_location = RESOURCE_IN_WIM;
        lte->rspec = rspec;
-       list_add(&lte->wim_resource_list, &rspec->lte_list);
-       lte->flags = rspec->flags;
-       lte->size = rspec->uncompressed_size;
+       list_add_tail(&lte->wim_resource_list, &rspec->lte_list);
 }
 
 static inline void