diff --git a/src/app/data_harvester/disks.rs b/src/app/data_harvester/disks.rs index 146965be..6f98d3f2 100644 --- a/src/app/data_harvester/disks.rs +++ b/src/app/data_harvester/disks.rs @@ -46,7 +46,7 @@ pub struct IoData { pub type IoHarvest = HashMap>; cfg_if! { - if #[cfg(not(target_os = "freebsd"))] { + if #[cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))] { mod io_counters; pub use io_counters::IoCounters; @@ -68,6 +68,10 @@ cfg_if! { Ok(io_hash) } + } else if #[cfg(not(target_os = "freebsd"))] { + pub fn get_io_usage() -> anyhow::Result { + anyhow::bail!("Unsupported OS"); + } } }