X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Fresource.h;h=c75986117643fd8c7c788baccc3070b8fbbc7117;hp=757531c9fd217da944e9af120cf8d6c3e33c6739;hb=30ba1eb06caca0b20a47d8dd75a117c82d730da7;hpb=2e44f90c21db693058037f83f92ad136c818ce9d diff --git a/include/wimlib/resource.h b/include/wimlib/resource.h index 757531c9..c7598611 100644 --- a/include/wimlib/resource.h +++ b/include/wimlib/resource.h @@ -23,6 +23,12 @@ struct resource_entry { u64 original_size; }; +struct resource_entry_disk { + u8 size[7]; + u8 flags; + le64 offset; + le64 original_size; +} _packed_attribute; /* Flags for the `flags' field of the struct resource_entry structure. */ @@ -84,11 +90,13 @@ read_resource_prefix(const struct wim_lookup_table_entry *lte, u64 size, consume_data_callback_t cb, void *ctx_or_buf, int flags); -extern const void * -get_resource_entry(const void *p, struct resource_entry *entry); +extern void +get_resource_entry(const struct resource_entry_disk *disk_entry, + struct resource_entry *entry); -extern void * -put_resource_entry(void *p, const struct resource_entry *entry); +extern void +put_resource_entry(const struct resource_entry *entry, + struct resource_entry_disk *disk_entry); extern int read_partial_wim_resource_into_buf(const struct wim_lookup_table_entry *lte,