sys_ioctl

Function sys_ioctl 

Source
pub fn sys_ioctl(abi: &mut LinuxRiscv64Abi, trapframe: &mut Trapframe) -> usize
Expand description

Linux ioctl system call implementation

This system call performs device-specific control operations on file descriptors, similar to the POSIX ioctl system call. It acts as a bridge between Linux ABI and Scarlet’s native HandleControl functionality.

§Arguments

  • fd: File descriptor
  • request: Control operation command
  • arg: Argument for the control operation (often a pointer)

§Returns

  • 0 or positive value on success
  • usize::MAX on error (-1 in Linux)