X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=include%2Fwimlib%2Flookup_table.h;h=9f6e3ea38008a15e271460c4a091e5ad819ddd6b;hb=f6ac8c7224155b283c8ffa180ff720e2e8291144;hp=216565e1939b334f2e6c9ac576199683b9137045;hpb=cc7b6ee47d4037ae8fa11b4c2d5154091d543704;p=wimlib diff --git a/include/wimlib/lookup_table.h b/include/wimlib/lookup_table.h index 216565e1..9f6e3ea3 100644 --- a/include/wimlib/lookup_table.h +++ b/include/wimlib/lookup_table.h @@ -106,6 +106,11 @@ struct wim_lookup_table_entry { * need this.) */ u32 dont_check_metadata_hash : 1; + u32 may_send_done_with_file : 1; + + /* Only used by wimlib_export_image() */ + u32 was_exported : 1; + union { /* (On-disk field) SHA1 message digest of the stream referenced * by this lookup table entry. */ @@ -132,10 +137,10 @@ struct wim_lookup_table_entry { /* Number of times this lookup table entry is referenced by dentries in * the WIM. When a WIM's lookup table is read, this field is - * initialized from a corresponding entry; while it should be correct, - * in general it may not be. wim_recalculate_refcnts() recalculates the - * reference counts for all streams and is run before doing any - * deletions. */ + * initialized from a corresponding entry. + * + * However, see lte_decrement_refcnt() for information about the + * limitations of this field. */ u32 refcnt; /* When a WIM file is written, this is set to the number of references @@ -166,10 +171,16 @@ struct wim_lookup_table_entry { struct wim_resource_spec *rspec; u64 offset_in_res; }; - tchar *file_on_disk; + struct { + tchar *file_on_disk; + struct wim_inode *file_inode; + }; void *attached_buffer; #ifdef WITH_FUSE - tchar *staging_file_name; + struct { + char *staging_file_name; + int staging_dir_fd; + }; #endif #ifdef WITH_NTFS_3G struct ntfs_location *ntfs_loc; @@ -220,10 +231,6 @@ struct wim_lookup_table_entry { u32 alloc_stream_owners; }; }; - - /* Actual reference count to this stream (only used while - * verifying an image). */ - u32 real_refcnt; }; /* Temporary list fields. */ @@ -338,9 +345,6 @@ sort_stream_list_by_sequential_order(struct list_head *stream_list, extern int lte_zero_out_refcnt(struct wim_lookup_table_entry *lte, void *ignore); -extern int -lte_zero_real_refcnt(struct wim_lookup_table_entry *lte, void *ignore); - static inline bool lte_is_partial(const struct wim_lookup_table_entry * lte) { @@ -348,19 +352,6 @@ lte_is_partial(const struct wim_lookup_table_entry * lte) lte->size != lte->rspec->uncompressed_size; } -static inline bool -lte_filename_valid(const struct wim_lookup_table_entry *lte) -{ - return lte->resource_location == RESOURCE_IN_FILE_ON_DISK - #ifdef __WIN32__ - || lte->resource_location == RESOURCE_WIN32_ENCRYPTED - #endif - #ifdef WITH_FUSE - || lte->resource_location == RESOURCE_IN_STAGING_FILE - #endif - ; -} - static inline const struct stream_owner * stream_owners(struct wim_lookup_table_entry *stream) {