diff --git a/src/extractors/filesystem_device_match.rs b/src/extractors/filesystem_device_match.rs index a894d58..6a6a75a 100644 --- a/src/extractors/filesystem_device_match.rs +++ b/src/extractors/filesystem_device_match.rs @@ -88,6 +88,15 @@ pub fn extract( context: Rc, extractor: &FilesystemDeviceMatchExtractor, ) -> Result { + // If no criteria are provided, bail with an error. + if extractor.has_label.is_none() + && extractor.has_item.is_none() + && extractor.has_partition_uuid.is_none() + && extractor.has_partition_type_uuid.is_none() + { + bail!("at least one criteria is required for filesystem-device-match"); + } + // Find all the filesystems inside the UEFI stack. let handles = uefi::boot::find_handles::() .context("unable to find filesystem handles")?;