int
read_metadata_resource(WIMStruct *wim, struct wim_image_metadata *imd)
{
- u8 *buf;
+ void *buf;
int ret;
struct wim_dentry *root;
const struct wim_lookup_table_entry *metadata_lte;
}
/* Read the metadata resource into memory. (It may be compressed.) */
- ret = read_full_resource_into_alloc_buf(metadata_lte, (void**)&buf);
+ ret = read_full_resource_into_alloc_buf(metadata_lte, &buf);
if (ret)
return ret;
*/
recalculate_security_data_length(sd);
subdir_offset = (((u64)sd->total_length + 7) & ~7) +
- dentry_correct_total_length(root) + 8;
+ dentry_out_total_length(root) + 8;
/* Calculate the subdirectory offsets for the entire dentry tree. */
calculate_subdir_offsets(root, &subdir_offset);
* the metadata resource. */
ret = write_wim_resource_from_buffer(buf, len, WIM_RESHDR_FLAG_METADATA,
&wim->out_fd,
- wim->compression_type,
+ wim->out_compression_type,
+ wim->out_chunk_size,
&imd->metadata_lte->output_resource_entry,
imd->metadata_lte->hash,
- write_resource_flags);
+ write_resource_flags,
+ &wim->lzx_context);
/* Original checksum was overridden; set a flag so it isn't used. */
imd->metadata_lte->dont_check_metadata_hash = 1;