Add context and file structs

This commit is contained in:
Jeremy Soller 2016-08-14 18:16:56 -06:00
parent 49739d47e8
commit 4e270bb807
9 changed files with 88 additions and 14 deletions

View file

@ -53,8 +53,12 @@ pub enum Error {
NotPermitted,
/// No such file or directory
NoEntry,
/// Bad file number
BadFile,
/// Invalid argument
InvalidValue,
/// Too many open files
TooManyFiles,
/// Syscall not implemented
NoCall
}
@ -66,7 +70,9 @@ impl From<Error> for usize {
match err {
Error::NotPermitted => 1,
Error::NoEntry => 2,
Error::BadFile => 9,
Error::InvalidValue => 22,
Error::TooManyFiles => 24,
Error::NoCall => 38
}
}