akern-gkgoat-fork/ableos/src/filesystem/errors.rs

27 lines
958 B
Rust

/*
* Copyright (c) 2022, Umut İnan Erdoğan <umutinanerdogan@pm.me>
*
* SPDX-License-Identifier: MPL-2.0
*/
pub enum FsError {
UnsupportedOperation,
InvalidDevice,
}
impl Into<FsError> for ext2::error::Error {
fn into(self) -> FsError {
match self {
ext2::error::Error::Other(_) => todo!(),
ext2::error::Error::BadMagic { magic: _ } => todo!(),
ext2::error::Error::OutOfBounds { index: _ } => todo!(),
ext2::error::Error::AddressOutOfBounds { sector: _, offset: _, size: _ } => todo!(),
ext2::error::Error::BadBlockGroupCount { by_blocks: _, by_inodes: _ } => todo!(),
ext2::error::Error::InodeNotFound { inode: _ } => todo!(),
ext2::error::Error::NotADirectory { inode: _, name: _ } => todo!(),
ext2::error::Error::NotAbsolute { name: _ } => todo!(),
ext2::error::Error::NotFound { name: _ } => todo!(),
}
}
}