2021-12-08 15:31:18 +01:00
|
|
|
use amdgpu::{utils, AmdGpuError};
|
2021-12-03 07:35:17 +01:00
|
|
|
use amdgpu_config::fan::ConfigError;
|
|
|
|
|
|
|
|
use crate::command::FanError;
|
2021-11-17 17:28:09 +01:00
|
|
|
|
|
|
|
#[derive(Debug, thiserror::Error)]
|
|
|
|
pub enum AmdFanError {
|
|
|
|
#[error("Vendor is not AMD")]
|
|
|
|
NotAmdCard,
|
|
|
|
#[error("No hwmod has been found in sysfs")]
|
|
|
|
NoHwMonFound,
|
|
|
|
#[error("No AMD Card has been found in sysfs")]
|
|
|
|
NoAmdCardFound,
|
|
|
|
#[error("{0}")]
|
|
|
|
AmdGpu(#[from] AmdGpuError),
|
|
|
|
#[error("{0}")]
|
|
|
|
Fan(#[from] FanError),
|
|
|
|
#[error("{0}")]
|
|
|
|
Config(#[from] ConfigError),
|
|
|
|
#[error("{0:}")]
|
|
|
|
Io(#[from] std::io::Error),
|
2021-12-08 15:31:18 +01:00
|
|
|
#[error("{0:}")]
|
|
|
|
AmdUtils(#[from] utils::AmdGpuError),
|
2021-11-17 17:28:09 +01:00
|
|
|
}
|