reshdr.offset_in_wim = pwm->in_fd.offset;
reshdr.uncompressed_size = le64_to_cpu(buf.blob_hdr.uncompressed_size);
wim_res_hdr_to_desc(&reshdr, pwm, rdesc);
- blob_set_is_located_in_wim_resource(blob, rdesc);
- blob->flags = rdesc->flags;
- blob->size = rdesc->uncompressed_size;
- blob->offset_in_res = 0;
+ blob_set_is_located_in_nonsolid_wim_resource(blob, rdesc);
+ blob->is_metadata = (rdesc->flags & WIM_RESHDR_FLAG_METADATA) != 0;
return 0;
read_error:
goto out;
if ((found_blob->blob_location != BLOB_NONEXISTENT)
- && !(found_blob->flags & WIM_RESHDR_FLAG_METADATA)
+ && !found_blob->is_metadata
&& (needed_blob = lookup_blob(blob_table, found_blob->hash))
&& (needed_blob->out_refcnt))
{
- needed_blob->offset_in_res = found_blob->offset_in_res;
- needed_blob->flags = found_blob->flags;
- needed_blob->size = found_blob->size;
-
blob_unset_is_located_in_wim_resource(found_blob);
- blob_set_is_located_in_wim_resource(needed_blob, rdesc);
+ blob_set_is_located_in_nonsolid_wim_resource(needed_blob, rdesc);
ret = (*cbs->begin_blob)(needed_blob,
cbs->begin_blob_ctx);
* MAX_OPEN_FILES locations, as measured by the 'out_refcnt' of each blob.
* Therefore, the apply_operations implementation need not worry about running
* out of file descriptors, unless it might open more than one file descriptor
- * per nominal destination (e.g. Win32 currently might because the destination
- * file system might not support hard links).
+ * per 'blob_extraction_target' (e.g. Win32 currently might because the
+ * destination file system might not support hard links).
*/
int
extract_blob_list(struct apply_ctx *ctx,
if (ret)
goto out_wimlib_free;
- if (!(xml_blob.flags & WIM_RESHDR_FLAG_METADATA))
- {
+ if (!xml_blob.is_metadata) {
ERROR("Expected XML data, but found non-metadata resource.");
ret = WIMLIB_ERR_INVALID_PIPABLE_WIM;
goto out_wimlib_free;
goto out_wimlib_free;
}
- if (!(metadata_blob->flags & WIM_RESHDR_FLAG_METADATA)) {
+ if (!metadata_blob->is_metadata) {
ERROR("Expected metadata resource, but found "
"non-metadata resource.");
ret = WIMLIB_ERR_INVALID_PIPABLE_WIM;