mirror of
https://github.com/sgmarz/osblog.git
synced 2024-11-24 02:16:19 +04:00
Add fs and minix
This commit is contained in:
parent
d6bf3d2685
commit
b39db75cf4
16
risc_v/src/fs.rs
Executable file
16
risc_v/src/fs.rs
Executable file
@ -0,0 +1,16 @@
|
||||
// fs.rs
|
||||
// Filesystem for SOS
|
||||
// Stephen Marz
|
||||
// 16 March 2020
|
||||
|
||||
use alloc::string::String;
|
||||
|
||||
pub trait FileSystem {
|
||||
fn open(path: &String) -> Option<Descriptor>;
|
||||
fn read(desc: &Descriptor, buffer: *mut u8, offset: u32, size: u32) -> u32;
|
||||
}
|
||||
|
||||
/// A file descriptor
|
||||
pub struct Descriptor {
|
||||
|
||||
}
|
@ -164,7 +164,9 @@ extern "C" fn kinit_hart(_hartid: usize) {
|
||||
|
||||
pub mod block;
|
||||
pub mod cpu;
|
||||
pub mod fs;
|
||||
pub mod kmem;
|
||||
pub mod minixfs;
|
||||
pub mod page;
|
||||
pub mod plic;
|
||||
pub mod process;
|
||||
|
11
risc_v/src/minixfs.rs
Executable file
11
risc_v/src/minixfs.rs
Executable file
@ -0,0 +1,11 @@
|
||||
// minixfs.rs
|
||||
// Minix 3 Filesystem Implementation
|
||||
// Stephen Marz
|
||||
// 16 March 2020
|
||||
|
||||
use crate::fs::{Descriptor, FileSystem};
|
||||
|
||||
pub struct MinixFileSystem {
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user