Bootable kernel skeleton

This commit is contained in:
Jeremy Soller 2016-08-13 18:21:46 -06:00
commit d5902c5a20
27 changed files with 1702 additions and 3 deletions

11
src/scheme/mod.rs Normal file
View 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>;
}