Implement mount/unmount
This commit is contained in:
parent
e88a2857e1
commit
5541cc3214
@ -10,6 +10,7 @@ primitive_enum!(pub enum Error: u32 {
|
||||
IsADirectory = 7,
|
||||
InvalidFile = 8,
|
||||
NotImplemented = 9,
|
||||
NotADirectory = 10,
|
||||
});
|
||||
|
||||
pub trait FromSyscallResult: Sized {
|
||||
|
16
src/io.rs
16
src/io.rs
@ -1,11 +1,27 @@
|
||||
use core::fmt;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Debug, PartialOrd, Ord, Eq)]
|
||||
#[repr(transparent)]
|
||||
pub struct RawFd(pub u32);
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq)]
|
||||
#[repr(transparent)]
|
||||
pub struct OpenFlags(pub u32);
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
#[repr(C)]
|
||||
pub struct MountOptions {
|
||||
pub source: Option<&'static str>,
|
||||
pub filesystem: Option<&'static str>,
|
||||
pub target: &'static str,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
#[repr(C)]
|
||||
pub struct UnmountOptions {
|
||||
pub mountpoint: &'static str,
|
||||
}
|
||||
|
||||
const O_READ: u32 = 1 << 0;
|
||||
const O_WRITE: u32 = 1 << 1;
|
||||
|
||||
|
@ -10,5 +10,8 @@ primitive_enum!(pub enum SyscallFunction: usize {
|
||||
Open = 7,
|
||||
Close = 8,
|
||||
|
||||
Mount = 101,
|
||||
Unmount = 102,
|
||||
|
||||
DebugTrace = 128,
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user