syscall.sh / riscv64 / getcwd

getcwd

get current working directory

sys_getcwd(char *buf, unsigned long size)
number17 (0x11)
abicommon
entry pointsys_getcwd
sinceLinux 4.15
man pagegetcwd(2)
sourceelixir.bootlin.com

Registers

registervalue
a717, the syscall number
a0char *buf
a1unsigned long size
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/getcwd