Bootable kernel skeleton
This commit is contained in:
parent
8f4aff05d5
commit
d5902c5a20
27 changed files with 1702 additions and 3 deletions
11
src/scheme/mod.rs
Normal file
11
src/scheme/mod.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/// A scheme is a primitive for handling filesystem syscalls in Redox.
|
||||
/// Schemes accept paths from the kernel for `open`, and file descriptors that they generate
|
||||
/// are then passed for operations like `close`, `read`, `write`, etc.
|
||||
///
|
||||
/// The kernel validates paths and file descriptors before they are passed to schemes,
|
||||
/// also stripping the scheme identifier of paths if necessary.
|
||||
pub trait Scheme {
|
||||
/// Open the file at `path` with `flags`.
|
||||
/// Returns a file descriptor or an error
|
||||
fn open(path: &str, flags: usize) -> Result<usize>;
|
||||
}
|
||||
Loading…
Reference in a new issue