From 30fed98a46d8fd73c5218a8bd54039eb7afa3106 Mon Sep 17 00:00:00 2001 From: 4lDO2 <4lDO2@protonmail.com> Date: Mon, 31 Mar 2025 14:01:00 +0200 Subject: [PATCH] Remove iopl and virttophys. --- src/call.rs | 19 ------------------- src/number.rs | 2 -- 2 files changed, 21 deletions(-) diff --git a/src/call.rs b/src/call.rs index b5c2812d55..3e9e2ab5ec 100644 --- a/src/call.rs +++ b/src/call.rs @@ -149,16 +149,6 @@ pub unsafe fn futex( ) } -/// Set the I/O privilege level -/// -/// # Errors -/// -/// * `EPERM` - `uid != 0` -/// * `EINVAL` - `level > 3` -pub unsafe fn iopl(level: usize) -> Result { - syscall1(SYS_IOPL, level) -} - /// Create a link to a file pub unsafe fn link(old: *const u8, new: *const u8) -> Result { syscall2(SYS_LINK, old as usize, new as usize) @@ -246,15 +236,6 @@ pub fn unlink>(path: T) -> Result { } } -/// Convert a virtual address to a physical one -/// -/// # Errors -/// -/// * `EPERM` - `uid != 0` -pub unsafe fn virttophys(virtual_address: usize) -> Result { - syscall1(SYS_VIRTTOPHYS, virtual_address) -} - /// Write a buffer to a file descriptor /// /// The kernel will attempt to write the bytes in `buf` to the file descriptor `fd`, returning diff --git a/src/number.rs b/src/number.rs index 78ae63ef68..1a46dcde22 100644 --- a/src/number.rs +++ b/src/number.rs @@ -69,10 +69,8 @@ pub const KSMSG_CANCEL: usize = SYS_CLASS_FILE | 76; pub const SYS_CLOCK_GETTIME: usize = 265; pub const SYS_FUTEX: usize = 240; -pub const SYS_IOPL: usize = 110; pub const SYS_SIGDEQUEUE: usize = 102; pub const SYS_MPROTECT: usize = 125; pub const SYS_MKNS: usize = 984; pub const SYS_NANOSLEEP: usize = 162; -pub const SYS_VIRTTOPHYS: usize = 949; pub const SYS_YIELD: usize = 158;