mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 20:43:41 +00:00
* refactor project structure * environment-based default registry * fix tests * update build container * use docker platform for iso build emulation * simplify compat * Fix docker platform spec in run-compat.sh * handle riscv compat * fix bug with dep error exists attr * undo removal of sorting * use qemu for iso stage --------- Co-authored-by: Mariusz Kogen <k0gen@pm.me> Co-authored-by: Matt Hill <mattnine@protonmail.com>
26 lines
639 B
Rust
26 lines
639 B
Rust
use std::path::Path;
|
|
|
|
use digest::generic_array::GenericArray;
|
|
use digest::{Digest, OutputSizeUser};
|
|
use sha2::Sha256;
|
|
|
|
use super::FileSystem;
|
|
use crate::prelude::*;
|
|
|
|
pub struct EfiVarFs;
|
|
impl FileSystem for EfiVarFs {
|
|
fn mount_type(&self) -> Option<impl AsRef<str>> {
|
|
Some("efivarfs")
|
|
}
|
|
async fn source(&self) -> Result<Option<impl AsRef<Path>>, Error> {
|
|
Ok(Some("efivarfs"))
|
|
}
|
|
async fn source_hash(
|
|
&self,
|
|
) -> Result<GenericArray<u8, <Sha256 as OutputSizeUser>::OutputSize>, Error> {
|
|
let mut sha = Sha256::new();
|
|
sha.update("EfiVarFs");
|
|
Ok(sha.finalize())
|
|
}
|
|
}
|