]> wimlib.net Git - wimlib/blobdiff - include/wimlib/resource.h
header.c, lookup_table.c: Read/write data from structures
[wimlib] / include / wimlib / resource.h
index 757531c9fd217da944e9af120cf8d6c3e33c6739..c75986117643fd8c7c788baccc3070b8fbbc7117 100644 (file)
@@ -23,6 +23,12 @@ struct resource_entry {
        u64 original_size;
 };
 
        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. */
 
 
 /* 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);
 
                     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,
 
 extern int
 read_partial_wim_resource_into_buf(const struct wim_lookup_table_entry *lte,