This commit is contained in:
elfein 2021-11-11 01:00:10 -08:00
parent 6459eb61e2
commit de7c831233

View file

@ -39,29 +39,29 @@ pub enum SysCall {
impl From<usize> for SysCall {
fn from(n: usize) -> Self {
match n {
0 => Self::KILL,
1 => Self::CONSOLE_RESET,
2 => Self::CONSOLE_IN,
3 => Self::CONSOLE_OUT,
4 => Self::CONSOLE_GET_TITLE,
5 => Self::CONSOLE_SET_TITLE,
10 => Self::GET_PRIORITY,
11 => Self::SET_PRIORITY,
12 => Self::GET_HOSTNAME,
13 => Self::SET_HOSTNAME,
20 => Self::GET_CONFIG,
21 => Self::SET_CONFIG,
22 => Self::MAKE_DIRECTORY,
23 => Self::DELETE_DIRECTORY,
24 => Self::RENAME_DIRECTORY,
25 => Self::SET_DIRECTORY_ACCESS,
26 => Self::MAKE_FILE,
27 => Self::DELETE_FILE,
28 => Self::RENAME_FILE,
29 => Self::SET_FILE_ACCESS,
30 => Self::FILE_READ,
31 => Self::FILE_WRITE,
50 => Self::ENCRYPT,
0x0 => Self::KILL,
0x1 => Self::CONSOLE_RESET,
0x2 => Self::CONSOLE_IN,
0x3 => Self::CONSOLE_OUT,
0x4 => Self::CONSOLE_GET_TITLE,
0x5 => Self::CONSOLE_SET_TITLE,
0xA => Self::GET_PRIORITY,
0xB => Self::SET_PRIORITY,
0xC => Self::GET_HOSTNAME,
0xD => Self::SET_HOSTNAME,
0x14 => Self::GET_CONFIG,
0x15 => Self::SET_CONFIG,
0x16 => Self::MAKE_DIRECTORY,
0x17 => Self::DELETE_DIRECTORY,
0x18 => Self::RENAME_DIRECTORY,
0x19 => Self::SET_DIRECTORY_ACCESS,
0x1A => Self::MAKE_FILE,
0x1B => Self::DELETE_FILE,
0x1C => Self::RENAME_FILE,
0x1D => Self::SET_FILE_ACCESS,
0x1E => Self::FILE_READ,
0x1F => Self::FILE_WRITE,
0x32 => Self::ENCRYPT,
_ => Self::EMPTY,
}
}