mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-23 21:55:11 +02:00
other: have dummy fallback for disk I/O for unsupported OSes (#1198)
This commit is contained in:
parent
13a8e5bf0e
commit
2ba7394ac2
@ -46,7 +46,7 @@ pub struct IoData {
|
|||||||
pub type IoHarvest = HashMap<String, Option<IoData>>;
|
pub type IoHarvest = HashMap<String, Option<IoData>>;
|
||||||
|
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
if #[cfg(not(target_os = "freebsd"))] {
|
if #[cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))] {
|
||||||
mod io_counters;
|
mod io_counters;
|
||||||
pub use io_counters::IoCounters;
|
pub use io_counters::IoCounters;
|
||||||
|
|
||||||
@ -68,6 +68,10 @@ cfg_if! {
|
|||||||
|
|
||||||
Ok(io_hash)
|
Ok(io_hash)
|
||||||
}
|
}
|
||||||
|
} else if #[cfg(not(target_os = "freebsd"))] {
|
||||||
|
pub fn get_io_usage() -> anyhow::Result<IoHarvest> {
|
||||||
|
anyhow::bail!("Unsupported OS");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user