mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-26 14:10:19 +00:00
other: have dummy fallback for disk I/O for unsupported OSes (#1198)
This commit is contained in:
parent
13a8e5bf0e
commit
2ba7394ac2
1 changed files with 5 additions and 1 deletions
|
@ -46,7 +46,7 @@ pub struct IoData {
|
|||
pub type IoHarvest = HashMap<String, Option<IoData>>;
|
||||
|
||||
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<IoHarvest> {
|
||||
anyhow::bail!("Unsupported OS");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue