implement squashfs generation

This commit is contained in:
Alex Zenla
2024-01-17 14:29:05 -08:00
parent f69ce96054
commit 198ca3ff80
8 changed files with 243 additions and 35 deletions

View File

@ -1,5 +1,7 @@
use backhand::BackhandError;
use std::error::Error;
use std::fmt::{Display, Formatter};
use std::path::StripPrefixError;
use xenclient::XenClientError;
pub type Result<T> = std::result::Result<T, HyphaError>;
@ -40,3 +42,27 @@ impl From<XenClientError> for HyphaError {
HyphaError::new(value.to_string().as_str())
}
}
impl From<ocipkg::error::Error> for HyphaError {
fn from(value: ocipkg::error::Error) -> Self {
HyphaError::new(value.to_string().as_str())
}
}
impl From<walkdir::Error> for HyphaError {
fn from(value: walkdir::Error) -> Self {
HyphaError::new(value.to_string().as_str())
}
}
impl From<StripPrefixError> for HyphaError {
fn from(value: StripPrefixError) -> Self {
HyphaError::new(value.to_string().as_str())
}
}
impl From<BackhandError> for HyphaError {
fn from(value: BackhandError) -> Self {
HyphaError::new(value.to_string().as_str())
}
}