if (ret != 0)
goto out_free_dentry_tree;
+ DEBUG("Reading dentry tree");
/* Now read the entire directory entry tree. */
ret = read_dentry_tree(buf, res_entry->original_size, dentry);
if (ret != 0)
goto out_free_dentry_tree;
+ DEBUG("Calculating dentry full paths");
/* Calculate the full paths in the dentry tree. */
ret = for_dentry_in_tree(dentry, calculate_dentry_full_path, NULL);
if (ret != 0)
goto out_free_dentry_tree;
+ DEBUG("Building link group table");
lgt = new_link_group_table(9001);
if (!lgt)
goto out_free_dentry_tree;
if (ret != 0)
goto out_free_lgt;
+ DEBUG("Freeing duplicate ADS entries in link group table");
+ ret = link_groups_free_duplicate_data(lgt);
+ if (ret != 0)
+ goto out_free_lgt;
+ DEBUG("Done reading image metadata");
+
imd->lgt = lgt;
imd->security_data = sd;
imd->root_dentry = dentry;
if (ret != 0)
return ret;
+ DEBUG("Updating metadata lookup table entry (size %zu)",
+ metadata_original_size);
+
/* Update the lookup table entry, including the hash and output resource
* entry fields, for this image's metadata resource. */
lte = wim_metadata_lookup_table_entry(w);
if (!lte)
return 0;
- /* No need to write file resources twice. (This indicates file
- * resources that are part of a hard link set.) */
+ /* No need to write file resources twice. */
if (++lte->out_refcnt != 1)
return 0;
len = lte->resource_entry.original_size;
- recompress_resource(in_fp, lte->symlink_buf, len, len, 0,
- 0, out_fp, out_wim_ctype, &new_size);
+ ret = recompress_resource(NULL, lte->symlink_buf, len, len, 0,
+ 0, out_fp, out_wim_ctype, &new_size);
output_res_entry->size = new_size;
output_res_entry->original_size = len;
output_res_entry->offset = offset;