-static int join_resource(struct lookup_table_entry *lte, void *split_wim)
-{
- FILE *split_wim_fp = ((WIMStruct*)split_wim)->fp;
- FILE *joined_wim_fp = ((WIMStruct*)split_wim)->out_fp;
- int ret;
-
- u64 size = lte->resource_entry.size;
- u64 offset = lte->resource_entry.offset;
- off_t new_offset = ftello(joined_wim_fp);
-
- if (new_offset == -1)
- return WIMLIB_ERR_WRITE;
-
- ret = copy_between_files(split_wim_fp, offset, joined_wim_fp, size);
- if (ret != 0)
- return ret;
-
- memcpy(<e->output_resource_entry, <e->resource_entry,
- sizeof(struct resource_entry));
-
- lte->output_resource_entry.offset = new_offset;
- lte->out_refcnt = lte->refcnt;
- lte->part_number = 1;
- return 0;
-}
-