syscall.sh / riscv64 / fstat

fstat

get file status

sys_newfstat(unsigned int fd, struct stat *statbuf)
number80 (0x50)
abi64
entry pointsys_newfstat
sinceLinux 4.15
man pagefstat(2)
sourceelixir.bootlin.com

Registers

registervalue
a780, the syscall number
a0unsigned int fd
a1struct stat *statbuf
a0the return value

Then run ecall to enter the kernel.

Same syscall on other architectures

Get this as JSON: https://api.syscall.sh/v2/syscalls/riscv64/fstat