VFIO mode enabled

This commit is contained in:
Luke D Jones
2021-03-20 23:26:03 +13:00
parent 45ab568f7a
commit 538e111e78
15 changed files with 240 additions and 179 deletions

View File

@@ -28,6 +28,7 @@ pub enum RogError {
Initramfs(String),
Modprobe(String),
Command(String, std::io::Error),
Io(std::io::Error),
Zbus(zbus::Error),
}
@@ -55,6 +56,7 @@ impl fmt::Display for RogError {
RogError::Initramfs(detail) => write!(f, "Initiramfs error: {}", detail),
RogError::Modprobe(detail) => write!(f, "Modprobe error: {}", detail),
RogError::Command(func, error) => write!(f, "Command exec error: {}: {}", func, error),
RogError::Io(detail) => write!(f, "std::io error: {}", detail),
RogError::Zbus(detail) => write!(f, "Zbus error: {}", detail),
}
}
@@ -87,3 +89,9 @@ impl From<zbus::Error> for RogError {
RogError::Zbus(err)
}
}
impl From<std::io::Error> for RogError {
fn from(err: std::io::Error) -> Self {
RogError::Io(err)
}
}