]> wimlib.net Git - wimlib/blobdiff - src/wim.c
Trim down 'flags' member of 'struct blob_descriptor'
[wimlib] / src / wim.c
index 5feb7a44fb2270b221c3d4aaefaf44632c3c943c..97aad090d3d6420051dfc044265cb279c4f1360f 100644 (file)
--- a/src/wim.c
+++ b/src/wim.c
@@ -143,6 +143,19 @@ wim_default_chunk_size(int ctype)
        }
 }
 
+static int
+is_blob_in_solid_resource(struct blob_descriptor *blob, void *_ignore)
+{
+       return blob->blob_location == BLOB_IN_WIM &&
+               (blob->rdesc->flags & WIM_RESHDR_FLAG_SOLID);
+}
+
+bool
+wim_has_solid_resources(const WIMStruct *wim)
+{
+       return for_blob_in_table(wim->blob_table, is_blob_in_solid_resource, NULL);
+}
+
 /*
  * Calls a function on images in the WIM.  If @image is WIMLIB_ALL_IMAGES,
  * @visitor is called on the WIM once for each image, with each image selected