We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 000e3ea commit fe714ccCopy full SHA for fe714cc
src/extractors/filesystem_device_match.rs
@@ -88,6 +88,15 @@ pub fn extract(
88
context: Rc<SproutContext>,
89
extractor: &FilesystemDeviceMatchExtractor,
90
) -> Result<String> {
91
+ // If no criteria are provided, bail with an error.
92
+ if extractor.has_label.is_none()
93
+ && extractor.has_item.is_none()
94
+ && extractor.has_partition_uuid.is_none()
95
+ && extractor.has_partition_type_uuid.is_none()
96
+ {
97
+ bail!("at least one criteria is required for filesystem-device-match");
98
+ }
99
+
100
// Find all the filesystems inside the UEFI stack.
101
let handles = uefi::boot::find_handles::<SimpleFileSystem>()
102
.context("unable to find filesystem handles")?;
0 commit comments